Database Reference
In-Depth Information
Figure 5-28
Data Entry Form with
Composite Multivalued
Attributes
is not a general company phone number, but rather the phone number of a particular person
at that company, then the data entry form would appear as in Figure 5-28. Here, for example,
Alfred has one phone number and Jackson has another.
In this case, the attributes PhoneNumber and Contact belong together. Accordingly, we
place them into a single ID-dependent entity, as shown in Figure 5-29. Notice that the identi-
fier of PHONE_CONTACT is Contact and CompanyName. This arrangement means that a
given Contact name can appear only once per company. Contacts can share phone numbers,
however, as shown for employees Lynda and Swee. If the identifier of PHONE_CONTACT was
PhoneNumber and CompanyName, then a phone number could occur only once per company,
but contacts could have multiple numbers. Work through these examples to ensure that you
understand them.
In all of these examples, the child requires a parent, which is always the case for ID-
dependent entities. The parent may or may not require a child, depending on the application.
A COMPANY may or may not require a PHONE or a CONTACT. You must ask the users to
determine whether the ID-dependent entity is required.
Multivalued attributes are common, and you need to be able to model them effectively.
Review the models in Figures 5-25, 5-27, and 5-29, and be certain that you understand their dif-
ferences and what those differences imply.
The archetype/Instance Pattern
The archetype/instance pattern (also called version/instance ) occurs when one entity repre-
sents a manifestation or an instance of another entity. You have already seen one example of
archetype/instance in the example of PAINTING and PRINT in Figure 5-10. The painting is the
archetype, and the prints made from the painting are the instances of that archetype.
COMPANY
Figure 5-29
Data Model for the Form
with Composite Multivalued
Attributes in Figure 5-28
CompanyName
City
Country
Volume
PHONE_CONTACT
CompanyName
Contact
PhoneNumber
 
Search WWH ::




Custom Search