Database Reference
In-Depth Information
the instances of the object PATIENT. This object set contains all patients who come
for dental service. The instances of the object SERVICE comprise all services
received by patients at the dental office. These include services such as oral exams,
X rays, amalgams, tooth extractions, prosthodontics, crowns, endodontics, and
periodontics.
Typically, the cost for a certain service received by a particular patient depends
on the type of insurance coverage the patient has. If patient Robert Bridges gets
complete upper dentures, cost for him is $595, whereas patient Diane Silverstein is
charged $475 for the same service. Different types of insurance policies cover the
patients, hence the variation in the service costs.
Is Cost an attribute of the object SERVICE? You find that values of Cost are not
dependent just on particular instances of this object alone. What are the values of
Cost ? The $595 and $475 indicated above are values of the attribute Cost . For com-
plete upper dentures to Robert, the value of the Cost attribute is $595; for the same
service to Diane, the value is $475. What does that mean? The values of the attribute
Cost depend on pairs of instances from PATIENT and SERVICE put together as
shown in the following examples:
(Robert Bridges, complete upper dentures)
$595
(Diane Silverstein, complete upper dentures)
$475
(John Rawlins, plastic crown)
$498
(Ruth Goldberg, plastic crown)
$325
Review the above examples. Robert, Diane, John, and Ruth are instances of
the object PATIENT. Complete upper dentures and plastic crown are instances
of the object SERVICE. What can you say about the pairs shown in parenthesis?
How can you represent this kind of real-world information in your data model?
You may consider these as instances of the two objects PATIENT and SERVICE
put together—instances of an aggregate object comprising the two individual
objects.
Figure 6-13 illustrates this concept of an aggregate or composite object.
A relationship viewed as an object gives rise to the notion of an aggregate
object.
An aggregate object behaves like any other object. A rectangular box represents
an aggregate object also. The aggregate object PATIENT-SERVICE is shown
as a large box surrounding the two objects whose relationship produces the
aggregate.
Figure 6-14 presents the aggregate object called SHIPMENT. Here the aggre-
gate is made up of three objects that participate in a three-way relationship. Note
the larger box representing the aggregate object encompassing all the three partic-
ipating objects.
From these two figures, note the following features of aggregate objects that are
common to all types of objects:
Attributes. An aggregate object has specific attributes representing real-world
information.
Search WWH ::




Custom Search