Database Reference
In-Depth Information
Unique values. Each entity within an entity type has a unique set of values for the
attributes. The values for CustomerName, CustomerAddress, CustomerPhone, and
CreditCode for John A. Harreld form a distinct set that pertains to this customer
entity. This, however, does not mean that a value for any attribute is not repeated
for other customers. Other customers may also have the value “AAB” for Credit-
Code.
Changeable values. As mentioned for the object-based data model, the values of
a particular customer entity may change over time. John A. Harreld may change his
phone number to (908) 887-6123.
Null values. An attribute may have a null value when the actual value is unknown,
unavailable, or missing.
Values and Domains
As you already know, each attribute of the various entities of an entity type gets its
values from a set of allowable values. This set of legal values forms the domain of
values for the attribute. Figure 7-7 displays examples of attributes and respective
domains for the entity type EMPLOYEE.
Note how the domain for each attribute consists of a set of allowable values.
Notice how the two attributes DateOfBirth and DateOfHire share the same
domain. A domain of values may apply to several attributes of an entity type.
However, each attribute takes its values from a single domain.
Attribute Types
In most cases, a particular attribute of a single entity has only one value at any given
time. For example, the attribute ProjectDuration for a single entity of the entity type
DeptCode
Salary
Position
EmpFirstName
DateOfBirth
DateOfHire
EMPLOYEE
ATTRIBUTE
VALUE
DOMAIN
EmpFirstName
Susan
Character: size 25
Position
Manager
Character: size 30 (Manager,
Programmer, Analyst, etc.)
Character: size 3, range D01-D99
DeptCode
D62
Salary
95000
Numeric: 6 digits, range 0-995000
DateOfBirth
01JAN1955
Valid date, range 01JAN1920 -
DateOfHire
16SEP1986
Valid date, range 01JAN1920 -
Figure 7-7
Attributes and domains for EMPLOYEE entity type.
Search WWH ::




Custom Search