Previous Topic: Set OrderNext Topic: User-Owned and System-Owned Index Sets


Index Sets

In an index set, a pointer array, or index, associated with each owner occurrence contains pointers to all related member record occurrences. There is no direct linkage between the members of an index set.

The following diagram illustrates an occurrence of the DEPT-EMPLOYEE set implemented as an index rather than a chain set. In this example, the MIS department record has an associated index structure that contains an entry for each associated employee.

Each entry in the index contains a pointer to a member record. The order of the entries determines the logical order of the members in the set. Just as for a chain set, the set order of an index set determines where new members are logically inserted into the set and can be: FIRST, LAST, NEXT, PRIOR, or SORTED. If the set order is sorted on a symbolic key, each index entry also contains the member record's sort key value and the entries in the index are sequenced to reflect the ascending or descending option with respect to those values. Records with duplicate sort keys can be positioned first or last of members with the same value, or they can be disallowed. The term index key is often used to refer to the sort key of an index set.