Loading...
 

AutoLayer

AutoLayer

In order to be able to easily describe many database layers that are largely identical in structure (by repeatedly referring to an already completely described layer), there is the AutoLayer statement:

AutoLayer(k, database1, database2, ..., databases)
  • k is an integer,
  • Starting with layer k, n further storages/layers (k, k+1, ..., k+n-1) are automatically generated. The first generated storage refers to database1. As with the storages , the databases are specified via the syntax DB(k).

With the specified databases, further storages are - normally - created with which the metafile entries are extended:

// Layer 0 1
File(name, stg0, stg1)
Storage(stg0, database0, segm1, EP(coll1), CSeg(segmc), Garbage(collg, segmg))
Storage(stg1, database0, segm2, EP(coll2), CSeg(segmc), Garbage(collg, segmg))
AutoLayer(2, database1, database2)

is short for:

// Layer 0 1 2 3
File(name, stg0, stg1, stg2, stg3)
Storage(stg0, database0, segm1, EP(coll1), CSeg(segmc), Garbage(collg, segmg))
Storage(stg1, database0, segm2, EP(coll2), CSeg(segmc), Garbage(collg, segmg))
Storage(stg2, database1, segm2, EP(coll2), CSeg(segmc), Garbage(collg, segmg))
Storage(stg3,
database2, segm2, EP(coll2), CSeg(segmc), Garbage(collg, segmg))

The automatically generated storages are therefore images of the last explicitly defined storage in another physical database. Furthermore, it is possible to

  • to copy the storages unchanged into the generated layers (with the ellipse '...')
  • not to let storages occur in the generated layer anymore (with the keyword 'STOP')

The repetition of the last storage in the metafile - without modifying the database - is required by adding the ellipse

, ...

follows.

With

, STOP

at the end of the storage information it is determined that no further storages will be generated for this metafile.

From

// Layer 0 1
File(fName1, stg0, stg1)
File(fName2, stga, stga, ...)
File(fName3, stgx, stgy, STOP)
Storage(stg0, database0, segm1, EP(coll1), CSeg(segmc), Garbage(collg, segmg))
Storage(stg1, database0, segm2, EP(coll2), CSeg(segmc), Garbage(collg, segmg))
Storage(stga, database0, segma, EP(colla), CSeg(segmc), Garbage(collg, segmg))
Storage(stgx, database0, segmx, EP(collx), CSeg(segmc), Garbage(collg, segmg))
Storage(stgy, database0, segmy, EP(colly), CSeg(segmc), Garbage(collg, segmg))
AutoLayer(2, database1, database2)

the following

// Layer 0 1 2 3
File(fName1, stg0, stg1, stg2, stg3) // Generierte Layer haben unterschiedliche Datenbanken
File(fName2, stga, stga, stga, stga) // Gleiche Storages mit gleicher Datenbank für alle Layer
File(fName3, stgx, stgy)
Storage(stg0, database0, segm1, EP(coll1), CSeg(segmc), Garbage(collg, segmg))
Storage(stg1, database0, segm2, EP(coll2), CSeg(segmc), Garbage(collg, segmg))
Storage(stga, database0, segma, EP(colla), CSeg(segmc), Garbage(collg, segmg))
Storage(stgx, database0, segmx, EP(collx), CSeg(segmc), Garbage(collg, segmg))
Storage(stgy, database0, segmy, EP(colly), CSeg(segmc), Garbage(collg, segmg))
Storage(stg2, database1, segm1, EP(coll2), CSeg(segmc), Garbage(collg, segmg))
Storage(stg3,
database2, segm2, EP(coll2), CSeg(segmc), Garbage(collg, segmg))

is generated.

In both examples the generated shares are marked in red.

Note: The ellipse (...) has priority over AutoLayer.

File statements with ellipse '...' can also be used without the AutoLayer statement. The meaning is similar: The last storage definition of the file statement is repeated as often as specified by the file statement with the most layers.

From

File(fName1, stg0, stg1, stg2, stg3)
File(fName
2, stga, ...)

will

File(fName1, stg0, stg1, stg2, stg3)
File(fName2, stga, stga, stga, stga)