DMBS Chapter 4 Notes
DMBS Chapter 4 Notes
EER stands for Enhanced ER or Extended ER. The various EER Model Concepts
- Includes all modeling concepts of basic ER.
- Additional concepts:
1. Subclasses/Superclasses and Attribute Inheritance
2. Specialization/Generalization
- These are fundamental to conceptual modeling
- The additional EER concepts are used to model applications more completely and more
accurately.
- EER includes some object-oriented concepts, such as inheritance.
Subclass - Often an Entity has many subgrouping which are meaningful and need to be
explicitly represented. These are called subclasses.
Superclass - Is the term used to describe the Entity that contains a subclass(s).
Example: EMPLOYEE entity type is grouped into SECRETARY, ENGINEER, MANAGER,
TECHNICIAN, SALARIED_EMPLOYEE, HOURLY_EMPLOYEE.
Here EMPLOYEE is superclass, SECRETARY, ENGINEER, etc. is subclass of EMPLOYEE.
1
EMPLOYEE/TECHNICIAN.
A class/subclass relationship is also called IS-A relationships
e.g. SECRETARY IS-A EMPLOYEE, TECHNICIAN IS-A EMPLOYEE, etc.
An entity that is member of a subclass represents the same real-world entity as some member of
the superclass:
The subclass member is the same entity in a distinct specific role
An entity cannot exist in the database merely by being a member of a subclass; it must
also be a member of the superclass
A member of the superclass can be optionally included as a member of any number of its
subclasses.
Examples: A salaried employee who is also an engineer belongs to the two subclasses:
ENGINEER, and
SALARIED_EMPLOYEE
A salaried employee who is also an engineering manager belongs to the three subclasses:
MANAGER,
ENGINEER, and
SALARIED_EMPLOYEE
It is not necessary that every entity in a superclass be a member of some subclass. Subclass is
shown with an arc on the line pointing toward the superclass. EER diagram also has "d"
(disjoint) in circle denoting unique specialization.
Example: SECRETARY (as well as TECHNICIAN and ENGINEER) inherit the attributes
Name, SSN, …, from EMPLOYEE. Every SECRETARY entity will have values for the
inherited attributes.
2
Generalization
The reverse of the specialization process
Generalization takes common features of subclasses and creates a superclass.
Example: CAR, TRUCK generalized into VEHICLE; both CAR, TRUCK become
subclasses of the superclass VEHICLE.
– We can view {CAR, TRUCK} as a specialization of VEHICLE
– Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK.
Figure 4.3a shows CAR and TRUCK with several common attributes. Figure 4.3b shows
VEHICLE superclass with CAR and TRUCK subclasses.