0% found this document useful (0 votes)
36 views18 pages

Enhanced Entity Relationship Model

Uploaded by

6bgp47tqr7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views18 pages

Enhanced Entity Relationship Model

Uploaded by

6bgp47tqr7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Enhanced Entity

Relationship Model

By:-
Dr. Vani Kapoor Nijhawan
Assistant Professor, VIPS
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:

• Subclasses/Superclasses and Attribute Inheritance

• 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.

Ms Vani Kapoor Nijhawan 2


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.

Ms Vani Kapoor Nijhawan 3


Example: EER Diagram (Ref: Navathe)

Ms Vani Kapoor Nijhawan


Superclass/Subclass Relationships
 The relationship between a superclass and any of its subclasses a superclass/subclass relationships or
class/subclass relationships. Example: EMPLOYEE/SECRETARY,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
5

Ms Vani Kapoor Nijhawan


Superclass/Subclass Relationships

 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.

Ms Vani Kapoor Nijhawan 6


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.

Ms Vani Kapoor Nijhawan 7


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}.

Ms Vani Kapoor Nijhawan 8


Specialization and Generalization

 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

Ms Vani Kapoor Nijhawan 9


Specialization : Example

10

Ms Vani Kapoor Nijhawan


Specialization and Generalization

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.

Ms Vani Kapoor Nijhawan 11


Generalization : Example

Ms Vani Kapoor Nijhawan 12


Ms Vani Kapoor Nijhawan 13
EER Model
Design a database to keep track of information for an art museum. Assume
that the following requirements were collected:
 ■ The museum has a collection of ART_OBJECTS. Each
ART_OBJECT has a unique Id_no, an Artist (if known), a Year (when
it was created, if known), a Title, and a Description. The art objects are
categorized in several ways, as discussed below.
 ■ ART_OBJECTS are categorized based on their type. There are three
main types: PAINTING, SCULPTURE, and STATUE, plus another
type called OTHER to accommodate objects that do not fall into one of
the three main types.
 ■ A PAINTING has a Paint_type (oil, watercolor, etc.), material on
which it is Drawn_on (paper, canvas, wood, etc.), and Style (modern,
abstract, etc.).
14

Ms Vani Kapoor Nijhawan


 ■ A SCULPTURE or a statue has a Material from which it was created
(wood, stone, etc.), Height, Weight, and Style.
 ■ An art object in the OTHER category has a Type (print, photo, etc.)
and Style.
 ■ ART_OBJECTs are categorized as either
PERMANENT_COLLECTION (objects that are owned by the
museum) and BORROWED. Information captured about objects in the
PERMANENT_COLLECTION includes Date_acquired, Status (on
display, on loan, or stored), and Cost. Information captured about
BORROWED objects includes the Collection from which it was
borrowed, Date_borrowed, and Date_returned.
Ms Vani Kapoor Nijhawan 15
EER Model
 ■ Information describing the country or culture of Origin (Italian,
Egyptian, American, Indian, and so forth) and Epoch
(Renaissance, Modern, Ancient, and so forth) is captured for each
ART_OBJECT.
 ■ The museum keeps track of ARTIST information, if known:
Name, DateBorn (if known), Date_died (if not living),
Country_of_origin, Epoch, Main_style, and Description. The
Name is assumed to be unique.
 ■ Different EXHIBITIONS occur, each having a Name,
Start_date, and End_date. EXHIBITIONS are related to all the art
objects that were on display during the exhibition.
Ms Vani Kapoor Nijhawan 16
 ■ Information is kept on other COLLECTIONS with which the
museum interacts, including Name (unique), Type (museum,
personal, etc.), Description, Address, Phone, and current
Contact_person.
 Draw an EER schema diagram for this application. Discuss any
assumptions you make, and that justify your EER design choices.

Ms Vani Kapoor Nijhawan 17


Ms Vani Kapoor Nijhawan 18

You might also like