Relationships associate one object with another, similar to the way verbs and verb phrases relate one noun or noun phrase to another. For instance, in the sentence "Janet is manager of Carol" the phrase "is manager of" specifies a relationship between the objects Janet and Carol.
In an ORM diagram, we represent a relationship with a line, and we provide a name for it. The name is usually a sentence that describes the relationship. We insist that the relationship name include the object name of each object it connects.
Figure 1. A relationship
The number of connections to objects in a relationship is called the arity of the relationship. If there are two connections, the relationship is binary. If there are three, it is ternary. For four objects the relationship is quaternary. Relationships with five or more are 5-ary, 6-ary, and so on. It is common to refer to relationships of arity three or more as n-ary relationships.
Figure 2. A 3-ary relationship
Our requirement that a relationship name contain the names of all objects that participate in the relationship may make relationship name long. We thus provide abbreviations for common cases. In the shorthand notation, we thus represent the relationship in Figure 1 as shown in Figure 3.
Figure 3. Relationship name abbreviation
Here is a short quiz so you can test your understanding of relationships.
Go to High-Level Object Classes Relationship Sets
Last updated 22 Sept 1994. by Mingkang Xu (firstname.lastname@example.org), Lei Cao(email@example.com)