0% found this document useful (0 votes)
2 views

DMBS Chapter 4 Notes

Uploaded by

Ananya Jain
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

DMBS Chapter 4 Notes

Uploaded by

Ananya Jain
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Chapter 4: Enhanced Entity-Relationship and Object Modeling

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.

1. Subclasses & Superclasses and Attribute 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.

The relationship between a superclass and any of its subclasses a superclass/subclass


relationships or class/subclass relationships. Example: EMPLOYEE/SECRETARY,

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.

Attribute Inheritance An entity that is member of a subclass inherits


 All attributes of the entity as a member of the superclass.
 All relationships of the entity as a member of the superclass.

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 . Specialization and Generalization


Specialization

 Specialization is the process of defining a set of subclasses of a superclass.


 The set of subclasses is based upon some distinguishing characteristics of the entities in
the superclass
Example: {SECRETARY, ENGINEER, TECHNICIAN} is a specialization of EMPLOYEE
based upon job type. Another specialization of EMPLOYEE based on method of pay is
{SALARIED_EMPLOYEE, HOURLY_EMPLOYEE}.
Superclass/subclass relationships and specialization can be diagrammatically represented in EER
diagrams
 Attributes of a subclass are called specific or local attributes.
 For example, the attribute TypingSpeed of SECRETARY
The subclass can also participate in specific relationship types. For example in fig 4.1, a
relationship BELONGS_TO of HOURLY_EMPLOYEE

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.

Diagrammatic notation are sometimes used to distinguish between generalization and


specialization.
- An arrow pointing to the generalized superclass represents a generalization
- Arrows pointing to the specialized subclasses represent a specialization
- We do not use this notation because it is often subjective as to which process is more
appropriate for a particular situation

You might also like