0% found this document useful (0 votes)
18 views16 pages

CIS3530L04

The document discusses the enhanced entity-relationship (EER) model. It introduces key concepts of the EER model including subclasses and superclasses, specialization, and attribute inheritance. Examples are provided to illustrate subclasses/superclasses and specialization hierarchies for entities like employees and members.

Uploaded by

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

CIS3530L04

The document discusses the enhanced entity-relationship (EER) model. It introduces key concepts of the EER model including subclasses and superclasses, specialization, and attribute inheritance. Examples are provided to illustrate subclasses/superclasses and specialization hierarchies for entities like employees and members.

Uploaded by

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

Database Systems and

Concepts

CIS*3530
Fall 2009 (L04)
1
Enhanced Entity-Relationship Model
• Since 1980s there has been an increase in
emergence of new database applications
with more demanding requirements.

• Basic concepts of ER modeling are not


sufficient to represent requirements of
newer, more complex applications.

• Response is development of additional


‘semantic’ modeling concepts.
EER Model: Enhanced ER Model
• The EER model introduced the concept of
superclass and subclass entity types in the ER
model.
• Example 1:
• Superclass: Member
• Subclass: Season Member, Regular Member,
Life Member.
• Example 1:
• Superclass: Librarian
• Subclass: Head Librarian, Salaried Librarian,
and Hourly Librarian.
EER Model: Enhanced ER Model
• The EER model introduced the concept of superclass
and subclass entity types in the ER model.
• Example 1:
• Superclass: Member
• Subclass: Season Member, Regular Member, Life
Member.
• Example 2:
• Superclass: Librarian
• Subclass: Head Librarian, Salaried Librarian, and
Hourly Librarian.
• Why?
• To add more semantic clarity to the design.
Enhanced-ER (EER) Model
Concepts
 Includes all modeling concepts of basic ER
 Additional concepts: subclasses/superclasses,
specialization/generalization, categories, attribute
inheritance
 The resulting model is called the enhanced-ER or
Extended ER (E2R or EER) model
 It is used to model applications more completely
and accurately if needed
 It includes some object-oriented concepts, such as
inheritance
Subclasses and Superclasses (1)

 An entity type may have additional meaningful


subgroupings of its entities
 Example: EMPLOYEE may be further grouped into
SECRETARY, ENGINEER, MANAGER, TECHNICIAN,
SALARIED_EMPLOYEE, HOURLY_EMPLOYEE,…
– Each of these groupings is a subset of EMPLOYEE entities
– Each is called a subclass of EMPLOYEE
– EMPLOYEE is the superclass for each of these subclasses
 These are called superclass/subclass relationships.
 Example: EMPLOYEE/SECRETARY,
EMPLOYEE/TECHNICIAN
Subclasses and Superclasses (2)
 These are also called IS-A relationships (SECRETARY IS-A
EMPLOYEE, TECHNICIAN IS-A EMPLOYEE, …).
 Note: 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
 Example: A salaried employee who is also an engineer belongs to the
two subclasses ENGINEER and SALARIED_EMPLOYEE
– It is not necessary that every entity in a superclass be a member of
some subclass
Attribute Inheritance in Superclass /
Subclass Relationships
 An entity that is member of a subclass inherits all
attributes of the entity as a member of the
superclass
 It also inherits all relationships
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.
– May have several specializations of the same superclass
 Example: Another specialization of EMPLOYEE based in 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 attributes. For
example, TypingSpeed of SECRETARY
– The subclass can participate in specific relationship types. For
example, BELONGS_TO of HOURLY_EMPLOYEE
Example of a Specialization
Class Exercise
 The Kumasi GCUC Library at Kenyase has asked
you to develop a Database System for their books
and Borrowing Members, with a hope to develop
programs that will help them keep track of books
lent, who they are lent to, when lent, and when
the books are due back, and any fines accrued.
What relations are necessary? What attributes
would they have? Design an ER diagram for the
Database.
15
The Toyota dealerships in the Kumasi area have decided to design a
database that keeps a record of all cars at all dealerships. The
database will hold data for a twelve month period at a time; old data
will be appropriately archived. Each dealership has a name,
dealership #, location and space (lot in square feet). Cars are divided
into new and used. Each car has a year, make, and model. Cars may
contain options which go by option #, description, and list price.
Options are divided into manufacturer and dealer-installed options.
For new cars there is a manufacturer's invoice with a date,
invoice_amount and a dealer_discount_amount. Used cars have a
purchase invoice with seller's_name, seller_address, date and
amount. When a car is sold by a salesman, a record of the sale
transaction is kept with a date, amount and a remarks describing
other details. Information about salesmen includes their name,
phone #, SS# and monthly sales quota for each of 12 months of the
car-year (Sept-August).
Exercise: Draw an Extended ER diagram of the conceptual schema
for this application. Supply additional attributes as needed.

16

You might also like