Previous Topic: OverviewNext Topic: Connecting Records to Chained Sets


Chained Sets

Use

A chained set is used to establish a logical relationship between two or more user-defined record types and consists of an owner record type and one or more member record types.

The following diagram uses standard CA IDMS database notation to describe a chained set type; the diagram includes the name of the set, linkage options, membership options, sort sequence (if any), and sort key (if any).

This example shows a chained set (the DEPT-EMPLOYEE set) between two user-defined record types. The owner of the DEPT-EMPLOYEE set type is the user-defined DEPARTMENT record type; the member is the EMPLOYEE record type.

Next, Prior, and Owner Pointers

A chained set occurrence consists of one occurrence of the owner record type and any number of member record occurrences. The prefix of each record occurrence that participates in a set contains a next pointer (that is, the db-key of the next logical record occurrence in the set occurrence). Optionally, record occurrences can include prior pointers, which link records together in the logically prior direction, and owner pointers, which link member record occurrences to the owner occurrence.

Note: SQL-defined constraints implemented as a chained set always have next, prior, and owner pointers.

Basic Structure of a Chained Set Occurrence

A record occurrence in a chained set occurrence always contains in its prefix a next pointer that points to the logically next record occurrence in the set occurrence.