Database Reference
In-Depth Information
type are distinguished by their double lines. Note that identifying relationship
types have cardinality (1,1) in the role of the weak entity type and may have
(0,n) or (1,n) cardinality in the role of the owner.
A weak entity type typically has a partial identifier ,whichisasetof
attributes that uniquely identifies weak entities that are related to the same
owner entity. An example is the attribute LineNo of OrderDetails ,whichstores
the line number of each product in an order. Therefore, the same number
can appear several times in different orders, although it is unique within each
order. As shown in the figure, partial identifier attributes are underlined with
a dashed line.
Employees
EmployeeID
Name
FirstName
LastName
Title
...
(total,disjoint)
Permanent
Employees
Salary
Temporary
Employees
ContractExpiration
ContractAmount
Fig. 2.3 Entity type Employees and two subtypes
Finally, owing to the complexity of conceptualizing the real world, human
beings usually refer to the same concept using several different perspectives
with different abstraction levels. The generalization (or is-a ) relationship
captures such a mental process. It relates two entity types, called the
supertype and the subtype , meaning that both types represent the same
concept at different levels of detail. The Northwind database does not
include a generalization. To give an example, consider Fig. 2.3 ,inwhichwe
have a supertype, Employees , and two subtypes, PermanentEmployees and
TemporaryEmployees . The former has an additional attribute Salary ,andthe
latter has attributes ContractExpiration and ContractAmount .
Generalization has three essential characteristics. The first one is pop-
ulation inclusion , meaning that every instance of the subtype is also
an instance of the supertype. In our example, this means that every
temporary employee is also an employee of the Northwind company. The
second characteristic is inheritance , meaning that all characteristics of the
supertype (e.g., attributes and roles) are inherited by the subtype. Thus, in
our example, temporary employees also have, for instance, a name and a title.
Finally, the third characteristic is substitutability , meaning that each time
Search WWH ::




Custom Search