Previous Topic: Connecting Members to Unsorted Indexed SetsNext Topic: Disconnecting Records from Indexed Sets


Connecting Members to Sorted Indexed Sets

Spawning

CA IDMS/DB organizes an index for sorted records into levels. When a top or intermediate SR8 record is full, CA IDMS/DB spawns a new level through the following steps:

  1. CA IDMS/DB splits the SR8 record into two SR8 records.
  2. CA IDMS/DB constructs a new higher-level SR8 record. This new full-size SR8 record contains only two entries. Each entry points to one of the SR8 records created by Step 1.

    CA IDMS/DB determines the target page of a new SR8 record, as follows:

CA IDMS/DB repeats this process as the index expands. Indexes can have any number of intermediate levels. As CA IDMS/DB adds new entries, it splits SR8 records and spawns new levels of SR8 records. An entry on one level points to an SR8 record at a lower level; the bottom-level entries point to the indexed database records themselves.

Connecting New Members

To connect new members into a sorted index, CA IDMS/DB first identifies the appropriate insertion point of the new entry based on the symbolic key or db-key. If this is the first entry (and, therefore, the first SR8 record), CA IDMS/DB creates, stores and connects a new SR8 record to the owner occurrence. CA IDMS/DB determines the target page for the new SR8 record as described above.

If this is not the first entry, CA IDMS/DB identifies the insertion point of the new entry based on the symbolic key or db-key. Once the appropriate insertion point is identified, CA IDMS/DB inserts the new entry into the index, as follows: