Table E and FILEORG X'100' files (File architecture)

From m204wiki
Revision as of 04:06, 2 April 2013 by Rob (talk | contribs) (Created page with "Holds Large Object Data (BLOBs and CLOBs) When FILEORG x'100'is set on a file, this is enabled by reorganizing / CREATEing a file with [[ESIZE par...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Holds Large Object Data (BLOBs and CLOBs)


When FILEORG x'100'is set on a file, this is enabled by reorganizing / CREATEing a file with ESIZE greater than 0, and then defining one or more fields with an attribute of CLOB or BLOB (the file must have an ESIZE for the latter to occur).

Available as of Model 204 V7.5


Summary

Storage and manipulation of Large Objects (LOBs):

The 'chained LOBs' in Table E under FILEORG x'100' files has a number of advantages over the way LOBs are stored and accessed in non x'100' files.

:space monitoring is simpler (as new occurrences of LOBs obtain space from the reuse queue when available.

:fields may be defined so that 'small' entries may be stored 'locally' in the record (and so do not use an entire page in Table E


Storing Large Objects

When a field is defined as a large object (LOB) (BLOB or CLOB attributes) a pointer is stored in the record (in Tables B or X) and the LOB is stored in Table E.

Pointer in the record

When you store a Large Object value in Table E, a Large Object descriptor is stored in Table B (or X depending on where the field is being ADDed). The descriptor contains the length, reserve, and a pointer to the Large Object data in the Table E page and is 27 bytes long.


Table E Space Utilization

Storing a Large Object

The following Parameters and Commands relate to the Use of Table E

Note: Pages are either used or not in Table E, so there is no formula to determine whether a page is added to the reuse queue (unlike Tables B and X). Because of this, there are no EREUSE, EREUSED, or EQLEN parameters. The size of the reuse queue can always be determined by the difference between EHIGHPG and EPGSUSED.

EHIGHPG parameter The highest active Table E page. (The first page in Table E is page zero.)
EPGSUSED parameter The number of Table E pages currently in use.
ESIZE parameter The number of pages in Table E
FILEORG parameter The file organisation