NTX Indices
Chapter Updated 04/13/23
Type | Size | Field Name | Description |
---|---|---|---|
xbShort | 2 | Signature Byte | The Clipper signature byte. 0x003h indicates Clipper 87. 0x006h indicates Clipper 5.x |
xbShort | 2 | Indexing Version Number | Documented as the "Compiler Version" but I have observed an increasing number. Incremented whenever the index is changed. |
xbLong | 4 | First Node Offset | The offset to the first node. |
xbLong | 4 | First Unused Page Offset | The offset to the first unused node. |
xbShort | 2 | Key Size + 8 | The Key Size plus 8 bytes. |
xbShort | 2 | Key Size | The size (length) of the key. |
xbShort | 2 | Number of Decimals | Number of decimal places in key. |
xbShort | 2 | Max Items Per Node | The maximum number of key per node. |
xbShort | 2 | 1/2 The Max Items Per Node | Half the maximum number of key per node. Important in a B-tree system, as this is the minimum number of keys that must be on a page. |
char | 256 | KeyExpression | Key expression string |
char | 1 | Unique | Unique indicator 00 - Not Unique - XB_NON_UNIQUE 01 - Unique - XB_UNIQUE |
char | 745 | Unused | Unused |
1024 | Total bytes in node |
Type | Size | Field Name | Description |
---|---|---|---|
xbShort | 2 | NoOfKeysThisNode | The number of key values in this node. (N) |
Array of xbUShort | 2 | offsets[] | Array of
HeadNode.KeysPerNode +1unsigned longs. These values are the offsets (in bytes) of each key in this node, from the beginning of the node. |
char | variable | KeyRecs | A repeating structure of pointers and keys. See the next table for the KeyRec structure. |
Type | Size | Field Name | Description |
---|---|---|---|
xbLong | 4 | LeftNodeNo | The node number (offset from beginning of file) of the lower node for this key. 0 in Leaf Nodes. |
xbLong | 4 | DbfRecNo | The DBF record number for this key. 0 in Interior Nodes. |
char | KeyLen | KeyValue | The key value. |