Three Ways to Classify a Relationship
- 0 Comments
Some basic terminology applies to relationships. The entities that are related are called participants, and the number of participants in a relationship is its degree. The vast majority of relationships are binary, having two participants, but unary relationships (a relation that is related to itself) are also common, while ternary relationships (with three participants) are not unknown. The examples throughout most of this chapter are binary. We’ll examine unary and ternary relationships as special cases later in the chapter.
The participation of an entity in a relationship can be classified as total participation or partial participation, depending on whether the entity can exist without participating in the relationship. For example, given the two entities Customer and Order, the participation of Customer in the relationship is partial since Customer details might be entered before the customer has placed any orders. Order, on the other hand, has total participation, since an order can’t be placed except by a Customer.
The same principle is sometimes used to classify the entities themselves as either weak (having total participation) or regular (having partial participation). Weak entities can exist only in relationships with other entities, while regular entities can exist in isolation.
Of the three ways to classify a relationship—total or partial, optional or mandatory, and in terms of weak or regular entities—I have always found optionality to be the most useful. However, explicitly expressing the effect of the relationship on the entity can be helpful in large or complex systems.