Record (File architecture): Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Overview == | |||
<p>A Model 204 Record is a collection of fields (either individually or in Repeating Field Groups (RFGs)) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.</p> | |||
There is only a limited fixed format for a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique internal record number that is used by the system to build index entries for the record. | <p>Each record is variable in length and need contain only the fields that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.</p> | ||
<p>There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique internal record number that is used by the system to build index entries for the record.</p> | |||
<p>For example, the following code:</p> | |||
<p class="code"> | |||
IN ''filename'' STORE RECORD | |||
END STORE | |||
</p> | |||
<p>Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.</p> | |||
== The Concept of a Model 204 Record == | == The Concept of a Model 204 Record == | ||
<p> | |||
<p>As noted above, a Model 204 record is highly variable in length. </p> | |||
=== <div id="Base Records">Base Records</div> === | === <div id="Base Records">Base Records</div> === | ||
=== Extension Records === | === <div id="Extension Records">Extension Records</div> === | ||
Line 25: | Line 45: | ||
<p> | |||
=== Extension Pointer === | |||
Line 33: | Line 54: | ||
=== Data === | === Data === | ||
<p>If there are any preallocated fields in a file (see the [[OCCURS attribute]]) every record in that file will begin with the set of such fields. The set of fields is stored | <p>If there are any preallocated fields in a file (see the [[OCCURS attribute]]) every record in that file will begin with the set of such fields. The set of fields is stored in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].</p> | ||
<p>After | <p>After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record), or positioned by an [[INSERT statement]]. | ||
<p>Each of the four is described below:</p> | <p>Each of the four is described below:</p> |
Revision as of 01:01, 12 April 2013
Overview
A Model 204 Record is a collection of fields (either individually or in Repeating Field Groups (RFGs)) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.
Each record is variable in length and need contain only the fields that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.
There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique internal record number that is used by the system to build index entries for the record.
For example, the following code:
IN filename STORE RECORD END STORE
Does, in fact, physically store a record. It has been assigned an #Internal Record Number and would contain the pre-allocated field structure (if any), but no data.
The Concept of a Model 204 Record
As noted above, a Model 204 record is highly variable in length.
Base Records
Extension Records
The Internal Record Number (IRN)
not permanent (changes during a reorganization)
used as target index (both hashed and B-tree indexing)
The Structure of a Model 204 Record
Extension Pointer
Data
If there are any preallocated fields in a file (see the OCCURS attribute) every record in that file will begin with the set of such fields. The set of fields is stored in the Record Map in Table D.
After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in either the order they were ADDed (which always adds the entity at the end of the record), or positioned by an INSERT statement.
Each of the four is described below: