Chapter 4
Chapter 4
Enhanced E-R
(EER) Models
Object-oriented extensions to E-R model
EER is important when we have a relationship between
two entities and the participation is partial between
entity occurrences. In such cases EER is used to reduce
the complexity in participation and relationship
complexity.
ER diagrams consider entity types to be primitive
objects
EER diagrams allow refinements within the structures
of entity types
EER Concepts
Generalization
Specialization
Sub classes
Super classes
Attribute Inheritance
Constraints on specialization and generalization
Generalization
Generalization occurs when two or more entities represent
categories of the same real-world object.
Generalization is the process of defining a more general
entity type from a set of more specialized entity types.
A generalization hierarchy is a form of abstraction that
specifies that two or more entities that share common
attributes can be generalized into a higher level entity
type.
Is considered as bottom-up definition of entities.
Generalization hierarchy depicts relationship between
higher level super class and lower level subclass.
Generalization hierarchies can be nested. That is, a subtype
of one hierarchy can be a super type of another. The level of
nesting is limited only by the constraint of simplicity.
Subclass/Subtype
An entity type whose tuples have attributes that
distinguish its members from tuples of the generalized or
super class entities.
When one generalized Super class has various subgroups
with distinguishing features and these subgroups are
represented by specialized form, the groups are called
subclasses.
Subclasses can be either mutually exclusive (disjoint) or
overlapping (inclusive).
A single subclass may inherit attributes from two distinct
super classes.
A mutually exclusive category/subclass is when an entity
instance can be in only one of the subclasses.
E.g.: An EMPLOYEE can either be SALARIED or PART-
TIMER but not both.
An overlapping category/subclass is when an entity
instance may be in two or more subclasses.
E.g.: A PERSON who works for a university can be
both EMPLOYEE and a STUDENT at the same
time.
Attribute Inheritance
An entity that is a member of a subclass inherits
all the attributes of the entity as a member of the
super class.
The entity also inherits all the relationships in
which the super class participates.
An entity may have more than one subclass
categories.
All entities/subclasses of a generalized entity or
super class share a common unique identifier
attribute (primary key). i.e. The primary key of
the super class and subclasses are always
identical.