Title: Enhanced Entity-Relationship Modeling
1Chapter 12
- Enhanced Entity-Relationship Modeling
2Enhanced Entity-Relationship Model
- Basic concepts of ER modeling are not sufficient
to represent requirements of newer, more complex
applications. - Semantic concepts are incorporated into the
original ER model and called the Enhanced
Entity-Relationship (EER) model. - Examples of additional concepts of EER model are
- specialization / generalization
- aggregation
3Specialization / Generalization
- Superclass
- An entity type that includes one or more distinct
subgroupings of its occurrences. - Subclass
- A distinct subgrouping of occurrences of an
entity type.
4Specialization / Generalization
- Superclass/subclass relationship is one-to-one
(11). - Superclass may contain overlapping or distinct
subclasses. - Not all members of a superclass need be a member
of a subclass.
5Specialization / Generalization
- Attribute Inheritance
- An entity in a subclass may possess
subclass-specific attributes, as well as those
associated with the superclass. - Specialization Process of maximizing differences
between members of an entity by identifying their
distinguishing characteristics. - Generalization Process of minimizing differences
between entities by identifying their common
characteristics. .
6AllStaff relation holding details of all staff
7Specialization/generalization of Staff entity
into subclasses representing job roles
8Specialization/generalization of Staff entity
into job roles and contracts of employment
9EER diagram with shared subclass and subclass
with its own subclass
10Constraints on Specialization / Generalization
- Two constraints that may apply to a
specialization/generalization - participation and disjoint constraints
- Participation constraint Determines whether
every member in superclass must participate as a
member of a subclass. - May be mandatory or optional.
- Disjoint constraint Describes whether member of
a superclass can be a member of one, or more than
one, subclass. - May be disjoint (Or) or nondisjoint (And).
11Constraints 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.
- Reasons for using Specialization/Generalization
- To add descriptive attributes specific to a
subclass - To identify entities that participate in a
relationship
12DreamHome worked example - Staff Superclass with
Supervisor and Manager subclasses
13DreamHome worked example - Owner Superclass with
PrivateOwner and BusinessOwner subclasses
14EER diagram of Branch view of DreamHome with
specialization/generalization
15Aggregation (textbook uses a different concept)
- Different meaning in UML (has-a or is-part-of
relationships in UML) - Used when we have to model a relationship
involving a relationship type - Aggregation allows us to treat a relationship
type as a high level entity for purpose of
participation in other relationships.
16Example of Aggregation
Contact_Name Contact_Phone Date
Job_Applicant SSN Name Address Phone
Company Cname Caddress
1
11
Interview
11
Starting_Date Starting_Salary
Results_in
01
Job_Offer Position
17Example of incorrect design
Job_Applicant SSN Name Address Phone
Company Cname Caddress
11
11
Contact_Name Contact_Phone Date Starting_Date Star
ting_Salary
If an interview does not result in an offer, then
Starting_Date and Starting_Salary are
NULL. Multiplicities are different than those on
previous diagram. May show a wrong interview
instance that is not allowed by the aggregation.
01
Job_Offer Position