Database Reference
In-Depth Information
PROJECT has a value of 90 days. At any given time, this is the only value for that
attribute. However, in real-world situations, you will come across attributes that may
have more than one value at the same time. You will also notice other types of vari-
ations in attributes.
In this subsection, we describe such variations in the types of attributes. As you
know, a semantic data model such as the E-R data model must reflect real-world
information correctly. The E-R model provides for representation of different
attribute types. Let us go over a few examples.
Single-Valued and Multivalued Attributes Note the following examples of
single-valued and multivalued attributes. Observe the values of attributes for a
single entity. These are the values at a given point in time.
Single-valued
Entity type:
EMPLOYEE
Attribute:
EmployeeJob
Attribute value for single entity:
Salesperson
Entity type:
EMPLOYEE
Attribute:
EmployeeDOB
Attribute value for single entity:
24JAN1975
Multivalued
Entity type:
AUTOMOBILE
Attribute:
ExteriorColor
Attribute values for single entity:
Beige, Gold (two-tone color)
Entity type:
CUSTOMER
Attribute:
CustomerPhone
Attribute values for single entity:
732-888-1234, 732-888-3456, 732-889-5566
Figure 7-8 illustrates how single-valued and multivalued attributes are repre-
sented in a data model diagram with different notations for the two types.
Simple and Composite Attributes This is another variation in attribute types.
In real-world information, you will notice that some attributes may be divided
further into smaller units. The smaller units are known as simple or atomic attrib-
utes, whereas the larger units are called composite attributes. Most of the attributes
in real-world information, however, are simple attributes. Your data model has to
represent these variations. Note the examples presented below.
Composite
Entity type:
CUSTOMER
Composite attribute:
CustomerAddress
Component simple attributes:
Street, City, State, Zip
Search WWH ::




Custom Search