Database Reference
In-Depth Information
Degrees of Relationships
Before we leave the topic of relationships, let us explore one final aspect of
relationships. From the examples seen so far, you note that objects are related in
twos or threes. That is, instances of two objects are associated with each other, or
instances of three objects are associated to form a combination. Figure 6-15 indi-
cates three types of relationships. Note the associations between instances of the
same object, between instances between two objects, and among instances of three
objects.
The degree of a relationship is the number of object sets that participate in the
relationship. If three objects participate in a relationship, its degree is 3. Occasion-
ally, the real-world information being modeled may require relationships of degrees
4, 5, or higher. Generally, the binary relationship is the most common type.
GENERALIZATION AND SPECIALIZATION
A true data model must reflect every aspect of real-world information. Do you
agree? If there are peculiarities about certain business objects, then the model must
represent those special conditions. If some relationships are different from regular
relationships, then the data model must portray those special relationships. A real-
istic data model should display everything about the set of real-world information
requirements. Frequently, you will find that some of the attributes and relationships
are the same for more than one object. The object-based data modeling technique
handles this special condition very well. Generalization and specialization of object
sets is a powerful feature of this technique.
Take the case of modeling the real-world information for a medical center. One
of the main business objects to be modeled is the PATIENT object. Think about
manages
EMPLOYEE
UNARY
STUDENT
takes
COURSE
BINARY
STUDENT
scores
COURSE
TERNARY
EXAMTYPE
Figure 6-15
Unary, binary, and ternary relationships.
Search WWH ::




Custom Search