The header is shown in table .
Relation data always begins on page 2 and continues on other pages via forward pointers. The set of relation pages constitutes the ``Relation table''. The Relation table obviously has `holes'—corresponding to attribute and link pages. The relation table holds dictionary data for all the relations in the database. Each page of the relation table has the following structure:
Attribute data always begins on page 3 and also continues on other pages via forward pointers. The set of attribute pages constitutes the ``Attribute table''. The Attribute table obviously has `holes'—corresponding to relation and link pages. The attribute table holds dictionary data for all the attributes in the database. Each page of the attribute table has the following structure:
Link data always begins on page 4 and also continues on other pages via forward pointers. The set of link pages constitutes the ``Link table''. The Link table obviously has `holes'—corresponding to relation and attribute pages.
As an example of a database header, consider the UCS VMS and VM/CMS implementations. We have: ZCW = 4, ZC = 16, and therefore Z = 4. Also, the page length of file 1 is 1024 words (ZF1).
Each row of the relation table occupies 19 (ZRELL = 7+3*Z) words so with 1024 (ZF1) words per page you can fit 53 (ZRELR = (ZF1-1)/ZRELL) rows of relation data on each page. This means that rows 1 through 53 would be on page 1, 54 through 107 on page 2 and so on. To make sure the relation data starts on the second page, rows 1 through 53 are skipped and the first relation row is 54. Therefore the initial value for NRROW is 54.
Each row of the attribute table occupies 14 (ZATTL = 6+2*Z) words so with 1024 words per page we can fit 73 (ZATTR = (ZF1-1)/ZATTL) rows of attribute data on each page. This means that rows 1 through 73 would be on page 1, 74 through 146 on page 2 and so on. To make sure the attribute data starts on the third page, rows 1 through 146 are skipped the first attribute row is 147. Therefore the initial value for NAROW is 147.
Each row of the link table occupies 21 (ZLNKL = 1+5*Z) words so with 1024 words per page we can fit 48 (ZLNKR = (ZF1-1)/ZLNKL) rows of link data on each page. This means that rows 1 through 48 would be on page 1, 49 through 96 on page 2 and so on. To make sure the link data starts on the fourth page, rows 1 through 144 are skipped the first link row is 145. Therefore the initial value for NLROW is 145.