Use of RAPs in a HIDAM database

RAPs are used differently in HIDAM databases than they are in HDAM or PHDAM databases.

In HDAM or PHDAM, RAPs exist to point to root segments. When the randomizing module generates roots with the same relative block and RAP number (synonyms), the RAP points to one root and synonyms are chained together off that root.

In HIDAM databases, RAPs are generated only if you specify PTR=T or PTR=H for a root segment. When either of these is specified, one RAP is put at the beginning of each CI or block, and root segments within the CI or block are chained from the RAP in reverse order based on the time they were inserted. By this method, the RAP points to the last root inserted into the block or CI, and the hierarchical or twin forward pointer in the first root inserted into the block or CI is set to zero. The hierarchical or twin forward pointer in each of the other root segments in the block points to the previous root inserted in the block.

The figure below shows what happens if you specify PTR=T or PTR=H for root segments in a HIDAM database. The figure uses the following abbreviations:

FSE
Free space element
RAP
Root anchor point
SC
Segment code
DB
Delete byte
TF
Twin forward
H
Hierarchical forward
Figure 1. Specifying PTR=T or PTR=H for root segments in a HIDAM database
CI has the following parts: FSE, RAP (points to last root), (start first root inserted) SC, DB, TF or H pointer=0, data, root segment, (start last root inserted) SC, DB, TF or H, data, root segment.

Note that if you specify PTR=H for a HIDAM root, you get an additional hierarchical pointer to the first dependent in the hierarchy. In the preceding figure, a 1 indicates where this additional hierarchical pointer would appear.

The implication of using PTR=T or PTR=H is that the pointer from one root to the next cannot be used to process roots sequentially. Instead, the HIDAM index must be used for all sequential root processing, and this increases access time. Specify PTR=TB or PTR=HB for root segments in a HIDAM database. Then no RAP is generated, and GN calls against root segments proceed along the normal physical twin forward chain. If no pointers are specified for HIDAM root segments, the default is PTR=T.