This chapter extends the discussion of the basic ER model to some advanced concepts like generalization and specialization etc.
1 of 16
Downloaded 12 times
More Related Content
Chapter-4 Enhanced ER Model
1. Learning Resource
On
Database Management Systems
Chapter-4
Enhanced Entity Relationship Model
Prepared By:
Kunal Anand, Asst. Professor
SCE, KIIT, DU, Bhubaneswar-24
2. Chapter Outcome:
After the completion of this chapter, the students
will be able to:
Define Enhanced Entity Relationship Model
Distinguish between super class and sub class
Distinguish between specialization and generalization
Explain aggregation and composition
Draw Enhanced ER Diagram
16 March 2021 2
3. Organization of this Chapter:
Introduction
Superclasses and Subclasses
Specialization and Generalization
Constraints on specialization/generalization
Aggregation and Composition
Sample example
16 March 2021 3
4. Enhanced ER Model
The Enhanced ER model, EER model, includes all the
modeling concepts of ER model along with some additional
concepts like super class and sub class, specialization,
generalization, aggregation, and composition.
Super class and Sub class:
Super class is an entity type that has a relationship with one
or more subtypes. On the other hand, Sub class is a group
of entities with unique attributes.
Sub class inherits properties and attributes from its super
class. Sub class and Super class relationship leads the
concept of Inheritance.
The relationship between sub class and super class is
denoted with d symbol, where d means disjointness.
16 March 2021 4
6. Specialization and Generalization
Specialization
The process of designating sub groupings within an
entity set is called Specialization.
An entity set may be specialized by more than one
distinguishing features.
ER-design, specialization is depicted by an
Inverted Triangle component labeled IS A (is a).
Specialization can be repeatedly used to refine a
ER design.
16 March 2021 6
8. EER Model (contd..)
Generalization:
Generalization is a simple inversion of specialization. It is
the process of extracting common properties from a set of
entity types and creating a generalized entity type from it.
It is a bottom-up approach in which two or more entitiy
types can be generalized to a higher level entity type, if
they have some attributes in common.
Specialization adopts top-down approach, while
Generalization adopts bottom-up approach.
A crucial property of the higher-level and lower-level
entities created by specialization and generalization is
attribute inheritance.
A lower-level entity set (or subclass) also inherits
participation in the relationship sets in which its higher-
level entity (or superclass) participates
16 March 2021 8
10. Constraints on Generalization/Specialization
Membership Constraint
Condition defined
Membership of a specialization/generalization relationship can be
defined as a condition in the requirements e.g. tanker is a ship where
cargo = oil.
User-defined
User-defined lower-level entity sets are not constrained by a
membership condition; rather, the database user assigns entities to a
given entity set.
Disjoint constraints
Disjoint:
The disjoint constraint only applies when a superclass has more
than one subclass. If the subclasses are disjoint, then an entity
occurrence can be a member of only one of the subclasses.e.g.
postgrads or undergrads; one cannot be both.
To represent a disjoint superclass/subclass relationship, Or is used.
16 March 2021 10
11. contd..
Overlapping: This applies when an entity occurrence may be a
member of more than one subclass, e.g. student and staff; some
people are both. And is used to represent the overlapping
specialization/generalization relationship in the ER diagram.
16 March 2021 11
12. contd..
Completeness constraints
Total: Each superclass (higher-level entity) must belong to
subclasses (lower-level entity sets), e.g. a student must be
postgrad or undergrad. To represent completeness in the
specialization/generalization relationship, the keyword
Mandatory is used.
16 March 2021 12
13. contd..
Partial: Some superclasses may not belong to subclasses
(lower-level entity sets), e.g. some people at UCT are neither
student nor staff. The keyword Optional is used to represent a
partial specialization/generalization relationship.
16 March 2021 13
14. Aggregation and Composition
Aggregation:
Aggregation represents a has-a relationship between entity types,
where one represents the whole and the other the part.
An example of aggregation is the Car and Engine entities. A car is
made up of an engine. The car is the whole and the engine is the part.
Aggregation does not represent strong ownership. This means, a part
can exist on its own without the whole. There is no stronger ownership
between a car and the engine. An engine of a car can be moved to
another car.
A line with a diamond at the end is used to represent aggregation.The
whole must be put at the end of the diamond.
16 March 2021 14
15. contd..
Composition
Composition is a form of aggregation that represents an
association between entities, where there is a strong
ownership between the whole and the part.
For example,: a tree and a branch have a composition
relationship. A branch is 'part' of a 'whole' tree - we cannot
cut the branch and add it to another tree.
A line with a filled diamond at the end is used to represent
composition where the diamond side is towards the part
side.
16 March 2021 15