Database Reference
In-Depth Information
Degree of a Relationship
The degree of a relationship in the E-R data model is defined in the same way as
in object-based data model. The degree of a relationship refers to the number of
entity types that participate in the relationship. A three-way relationship is a ternary
relationship, two-way a binary relationship, and one-way a unary relationship. A
unary relationship is also known as a recursive relationship, because the entities of
the same entity type associate with one another.
Figure 7-12 illustrates the concept of relationship degrees. It presents relation-
ships whose degrees are three, two, and one. You may visualize relationships
with higher degrees, although they are not common in real-world information
requirements. Binary relationships are the most common relationships in the real
world.
Cardinality in Relationships
It may be worthwhile to refer back to our detailed discussion of cardinality in rela-
tionship expressed in the object-based data model. The discussion covered one-to-
one, one-to-many, and many-to-many relationships. Also, the notions of maximum
and minimum cardinalities should be reviewed. The same principles and concepts
apply to the E-R data model as well. We do not propose to repeat the discussions
here. However, let us note the notations used for representing these two relation-
ship types in the E-R data model.
Figure 7-13 shows the notations for representing these relationship types. Note
the minimum and maximum cardinality indicators placed near each entity type.
Optional and Mandatory Conditions
Recall how the minimum cardinality indicator expresses the optional or mandatory
nature of a relationship. Placing a “0” as the minimum cardinality indicator near an
Degree of
Relationship
WAREHOUSE
scores
PRODUCT
THREE
SHIP METHOD
CUSTOMER
places
ORDER
TWO
ASSOCIATE
supervises
ONE
Figure 7-12
Degrees of relationships.
Search WWH ::




Custom Search