The Enhanced Entity-Relationship (EER) Model: Database System
The Enhanced Entity-Relationship (EER) Model: Database System
Generalization:
We can think of a reverse process of abstraction in which we
suppress the differences among several entity types, identify
their common features, and generalize them into a single
superclass of which the original entity types are special
subclasses. For example, consider the entity types CAR and
TRUCK shown in Figure 2(a). Because they have several
common attributes, they can be generalized into the entity type
VEHICLE, as shown in Figure 2(b). Both CAR and TRUCK are
now subclasses of the generalized superclass VEHICLE. We use
the term generalization to refer to the process of defining a
generalized entity type from the given entity types.
Specialization and Generalization
Figure 2 Generalization. (a) Two entity types, CAR and TRUCK. (b) Generalizing CAR and
TRUCK into the superclass VEHICLE.
Specialization and Generalization
d
Constraints on Specialization and
Generalization
• If the subclasses are not constrained to be disjoint, their sets
of entities may be overlapping; that is, the same (real-
world) entity may be a member of more than one subclass
of the specialization. This case, which is the default, is
displayed by placing an o in the circle, as shown in Figure 4.
o
Constraints on Specialization and
Generalization
■ Disjoint, total
■ Disjoint, partial
■ Overlapping, total
■ Overlapping, partial
Specialization and Generalization
Hierarchies and Lattices
A subclass itself may have further subclasses specified on it,
forming a hierarchy or a lattice of specializations. For example,
in Figure 5 ENGINEER is a subclass of EMPLOYEE and is also a
superclass of ENGINEERING_MANAGER; this represents the
real-world constraint that every engineering manager is
required to be an engineer.
Specialization and Generalization
Hierarchies and Lattices
8.20