Previous Topic: RecordsNext Topic: Set Mode


Sets

A set type expresses a relationship between two (or more) record types, where one record type is the owner and the other is the member. For example, to show the departments to which the employees belong, we might establish a DEPT-EMPLOYEE set type, where the record type DEPARTMENT is the owner and the record type EMPLOYEE is the member.

One set occurrence exists for each occurrence of the owner record. Any number of member record occurrences may be part of one set occurrence. For example, each DEPT-EMPLOYEE set occurrence consists of the one DEPARTMENT record plus any numbers of EMPLOYEE records, depending on how many employees are in the department.

The following figure illustrates the DEPT-EMPLOYEE set type and two occurrences of the set. Note that each set occurrence contains only one DEPARTMENT record (the owner) but several EMPLOYEE records (members).

A member record occurrence does not have to participate in a set occurrence but it cannot be connected to more than one set occurrence within a given set type. The following figure shows that June Moon does not have to participate in a DEPT-EMPLOYEE set but she cannot belong to both MIS and Sales.

Attributes of a set determine how it is represented within the database and specify the rules for membership. The most significant of these are: