7/29/2019 Enhanced Entity Relationships Model
1/27
Enhanced Entity-Relationship Model
7/29/2019 Enhanced Entity Relationships Model
2/27
Objectives2
In this class, student will learn: Limitations of basic concepts of the ER model and
requirements to represent more complex applications usingadditional data modeling concepts.
Most useful additional data modeling concepts of EnhancedER (EER) model called: specialization/generalization aggregation composition.
A diagrammatic technique for displayingspecialization/generalization, aggregation, and compositionin an EER diagram using UML.
7/29/2019 Enhanced Entity Relationships Model
3/27
Enhanced Entity-Relationship Model
3
Since 1980s there has been an increase inemergence of new database applications withmore demanding requirements.
Basic concepts of ER modeling are notsufficient to represent requirements of newer,more complex applications.
Response is development of additionalsemantic modeling concepts.
7/29/2019 Enhanced Entity Relationships Model
4/27
The Enhanced Entity-Relationship Model
Semantic concepts are incorporated into theoriginal ER model and called the EnhancedEntity-Relationship (EER) model.
Examples of additional concepts of EER modelare: specialization / generalization
aggregation
composition
7/29/2019 Enhanced Entity Relationships Model
5/27
Specialization / Generalization
Superclass/supertype An entity type that includes one or more distinct
subgroupings of its occurrences.
Subclass/subtype A distinct subgrouping of occurrences of an entity type.
7/29/2019 Enhanced Entity Relationships Model
6/27
Generalization Hierarchies6
Employee
EmpNo
EmpName
EmpHireDate
...
SalaryEmp
EmpSalary
HourlyEmp
EmpRate
generalization hierarchysymbol
supertype
subtypes
7/29/2019 Enhanced Entity Relationships Model
7/27
Specialization / Generalization
Superclass/subclass relationship isone-to-one (1:1).
Superclass may contain overlappingor distinct subclasses.
Not all members of a superclass needbe a member of a subclass.
7/29/2019 Enhanced Entity Relationships Model
8/27
Specialization / Generalization
Attribute Inheritance
An entity in a subclass represents same real world object
as in superclass, and may possess subclass-specific
attributes, as well as those associated with the superclass.
7/29/2019 Enhanced Entity Relationships Model
9/27
Specialization / Generalization
Specialization
Process of maximizing differences between members of anentity by identifying their distinguishing characteristics.
Generalization
Process of minimizing differences between entities byidentifying their common characteristics.
7/29/2019 Enhanced Entity Relationships Model
10/27
AllStaff relation holding details of all staff
7/29/2019 Enhanced Entity Relationships Model
11/27
Specialization/generalization of Staff entity into
subclasses representing job roles
7/29/2019 Enhanced Entity Relationships Model
12/27
Specialization/generalization of Staff entity into
job roles and contracts of employment
7/29/2019 Enhanced Entity Relationships Model
13/27
EER diagram with shared subclass and
subclass with its own subclass
7/29/2019 Enhanced Entity Relationships Model
14/27
Constraints on Specialization /
Generalization
Two constraints that may apply to aspecialization/generalization:
participation constraints
disjoint constraints.
Participationconstraint
Determines whether every member in superclassmust participate as a member of a subclass.
May be mandatory or optional.
7/29/2019 Enhanced Entity Relationships Model
15/27
Constraints on Specialization /
Generalization
Disjoint constraint
Describes relationship between members of the
subclasses and indicates whether member of a
superclass can be a member of one, or more than one,subclass.
May be disjoint or nondisjoint.
7/29/2019 Enhanced Entity Relationships Model
16/27
Constraints on Specialization /
Generalization
There are four categories of constraints of
specialization and generalization:
mandatory and disjoint
optional and disjoint mandatory and nondisjoint
optional and nondisjoint.
7/29/2019 Enhanced Entity Relationships Model
17/27
DreamHome worked example - Staff
Superclass with Supervisor and Manager
subclasses
7/29/2019 Enhanced Entity Relationships Model
18/27
DreamHome worked example - Owner
Superclass with PrivateOwner and
BusinessOwner subclasses
ream ome wor e examp e erson
7/29/2019 Enhanced Entity Relationships Model
19/27
ream ome wor e examp e - ersonsuperclass with Staff, PrivateOwner, and Client
subclasses
7/29/2019 Enhanced Entity Relationships Model
20/27
EER diagram of Branch view of DreamHome
with specialization/generalization
7/29/2019 Enhanced Entity Relationships Model
21/27
Aggregation
Represents a has-a or is-part-of relationship
between entity types, where one represents the
whole and the other the part.
7/29/2019 Enhanced Entity Relationships Model
22/27
Examples of Aggregation
7/29/2019 Enhanced Entity Relationships Model
23/27
Aggregation23
Sale
SaleDate
Employee
Item
Description
Cost
* *contains
Aggregation: the Sale consists of a set of Items being sold.
7/29/2019 Enhanced Entity Relationships Model
24/27
Composition
Specific form of aggregation that represents an
association between entities, where there is a
strong ownership and coincidental lifetime
between the whole and the part.
7/29/2019 Enhanced Entity Relationships Model
25/27
Example of Composition
7/29/2019 Enhanced Entity Relationships Model
26/27
Composition
26Bicycle
Size
Model Type
Wheels
Rims
Spokes
1 2built from
Composition: aggregation where the components become the new object.
Crank
ItemID
Weight
Stem
ItemIDWeight
Size
1
1
1
1
Bicycle
Size
Model Type
Wheels
Crank
StemTwo ways to
display
composition.
7/29/2019 Enhanced Entity Relationships Model
27/27
Enhanced Entity-RelationshipModel
27
End of Presentation