Previous Topic: Database Keys (Db-key)Next Topic: Set Linkage


Record Structure

A record occurrence, as it physically appears on a database page, has two parts:

A record's prefix is never visible to a program. Only data is returned to a program when a record is accessed.

For example, if the DEPARTMENT and EMPLOYEE records participate only in the DEPT-EMPLOYEE set, which uses only NEXT linkage, each record in the set consists of one pointer (to the next record in the set) followed by the value of the record, as illustrated in the following figure.

If however, the set also uses PRIOR linkage, each record consists of two pointers plus the data, as shown below.

OWNER linkage requires an additional pointer in the prefix of each member record. The owner record does not need an additional pointer.

Participation in additional sets requires additional pointers. An EMPLOYEE record that is a member in the DEPT-EMPLOYEE set (with NEXT, PRIOR, and OWNER linkage) and the owner in the EMP-COVERAGE set (with NEXT, PRIOR, and OWNER linkage) requires a total of five pointers, as illustrated in the following figure.

Participation in user-owned index sets also requires pointers. The owner occurrence always contains NEXT and PRIOR pointers to the index structure and member occurrences always contain an INDEX pointer into the index structure. Member occurrences may optionally contain an OWNER pointer to the owner occurrence. The following diagram illustrates the DEPT-EMPLOYEE user-owned index set defined with OWNER linkage.

Unlinked system-owned index sets require no pointers in the indexed record occurrences. Linked system-owned indexes require an INDEX pointer in each member record. System-owned indexes never have OWNER pointers. The following figure illustrates an unlinked system-owned index, DEPARTMENT-IX, defined on the DEPARTMENT record to allow access by name.