Previous Topic: Types and OccurrencesNext Topic: Records


Relationships

A relationship is a logical association between two or more entity types. For example, at Commonweather Corporation, there are employees and departments each of which is represented by an entity type in the database. The group of employees that work in a given department is an example of a relationship between the department and employee entity types. The employee that is the head of a department is another example of a relationship between these same types.

A relationship may be optional or it may be required. For example, if every employee must work in some department, the relationship is required and it imposes a constraint on occurrences of the employee type. In an SQL defined database, such relationships are called referential constraints; in a non-SQL defined database, such relationships are called sets.