Enhanced Entity
Relationship (EER) Model
The Entity (Review)
● Entity Relationship (ER) Model – represents an
object
● Physical – person, car
● Conceptual – school, company
● ER model is based on the perception of the real
world as a collection of objects with attributes
● Attributes – describe the entity
● Single, Multi-value
● Composite, Simple
● Derived, Stored
What is an EER Model?
● Enhanced Entity Relationship (EER) –
Data Modeling
● EER shows complex relationships
between objects in a database
(multimedia, geographical).
● Concepts of subclasses and superclasses,
specializations and generalizations.
● Put concepts in diagram to form EER
model
Specialization
Subgrouping into subclasses (top-down approach)
● Example: EMPLOYEE -> SECRETARY
MANAGER, etc.
● Inheritance – Inherit attributes and relationships
from superclass (Name, Birthdate, etc.)
● Subclasses may have uniqe attributes
● SECRETARY has TypingSpeed attribute, MANAGER
has BusinessUnitManaged, etc.
Specialization (cont.)
SSN Name
EMPLOYEE
JobType PayMethod WORKS_IN
DEPARTMENT
U
U
SECRETARY ENGINEER
U U U
SALARY_EMP. HOURLY_EMP.
SOFTWARE_ENGINEER
Model Shapes
● When you have more than one subclass
based on the same defining attribute
(JobType), use
● To show class/subclass relationships, use
U
● Used for relationships between entity types
● To show relationship between two different
entity types, use
Generalization
Reverse processes of defining subclasses
(bottom-up approach)
● Bring together common attributes in
entities
● Example: CAR (with attributes color, price,
max speed) and TRUCK (with attributes
color, price, tonnage) can be generalized
into VEHICLE (with attributes color and
price).
Hierarchies and Lattices
● Hierarchy – subclass participates in one class/subclass
relationship
EMPLOYE SOFTWARE ENGINEER
E has all the attributes of
an ENGINEER and
U
EMPLOYEE
SECRETAR U
ENGINEER
Y
SOFTWARE ENGINEER
Hierarchies and Lattices
● Lattice – subclass participates in more than one
class/subclass relationship
ENGINEERING
EMPLOYE MANAGER (shared
E subclass) is a
MANGER and an
U
ENGINEER
U
SECRETAR U ENGINEER MANAGER
Y
U
U
ENGINEERING MANAGER
Categories
● Models a class/subclass with more than one
superclass of distinct entity types. Attribute
inheritance is selective.
PERSON BANK COMPANY
The category, OWNER,
U is a subclass of the union
of PERSON, BANK, and
U COMPANY. OWNER is
either a PERSON or a
OWNER BANK or a COMPANY
Constraints
● Disjoint – an entity can be a member of at most
one subclass of a specialization d
● Overlap – an entity may belong to more than one
subclass of a specialization o
● Total specialization – each entity of a superclass
belongs to some subclass of a specialization
● Partial specialization – each entity of a
superclass does not have to belong to some
subclass of a specialization