You are on page 1of 16

Enhanced Entity

Relationship
Diagram
(EER Diagram)

Miratul Khusna Mufida


Ganjil 2017
Politeknik Negeri Batam
EER specialization generalization

aggregation
Specialization
There are two types of lecturers, permanent and part
time lecturers
Both lecturer types have same attributes :
employee id, name, gender, hp, education, home
address
Each lecturer types also has specific atributes
Permanent lecturers are the university employees
Attribute : Employee Id, grade, start date, length of
working(year), room Id, Ext No, Boss
Part time lecturers work at other companies
Attribute : office name, office address, number of
teaching hours
The difference of attribute between permanent and
part time lecturers makes impossible to create only
one entity set, lecturer. So make a specialization
Specialization Top down process
Hp
gender education

name lecturer Home address

Employee Id
IS A

grade
permanent boss part time
start date lecturer lecturer Number of teaching
hours
Ext No
Length of working Room Id
office name office address

Definition : designing sub groups from an entity set


How about this case?
Student

IS A

D3 Student D4 Student

Students have two types : D3 student and D4 student


Identify D3 student attributes !
Identify D4 student attributes
Does D3 student and D4 student have different attributes?
Generalization
If their attributes are same, merge D3 student and D4 student
to one entity set (student) and add a new attribute to save
level (D3/D4)
Definition : designing general entity set that is based on some
special entity sets

Before After Student


Student

IS A

D3 Student D4 Student

bottom up
process
Attribute Inheritance
Hp
gender education

name lecturer Home address

Employee Id
IS A

grade
permanent boss part time
start date lecturer lecturer Number of teaching
hours
Ext No
Length of working Room Id
office name office address

The higher-level entity sets inherits their attributes to the lower-


level entity sets
What are lecturer attributes?
What are permanent lecturer attributes?
What are part time lecturer attributes?
Relationship Inheritance
Relationshipsof the higher-level entity sets
are inherited to lower-level entity sets
Relationship teach
Relationship Inheritance
A sub entity set can participate in his own relationship
which another sub entity set do not participate
Aggregation
name
borrow
Id No address loan no amount
date

customer borrow loan

name
payment payment no
Id No address amount
date

customer pay payment

Payment relationship is created after borrow


relationship
How do we show those relationships connection?
name
borrow
Id No address loan no amount
date

customer borrow loan

payment Which model does


(i) pay
date
show time sequence
and connection
payment amount
between borrow&pay
relationship?
payment no * (i) or (ii) or (iii)

name
borrow
Id No address loan no amount
date

customer pay loan

(ii) payment
date

payment
amount

payment no
name
borrow
Id No address loan no amount
date

customer borrow loan

(iii) pay

payment
date

payment

payment no amount
How about this?
name
borrow
Id No address loan no amount
date

customer borrow loan

prohibition
pay

payment
date

payment

payment no amount
name
borrow
Id No address loan no amount
date
Aggregation form
customer borrow loan

payment
pay
date

payment no payment amount

Aggregation : an abstraction which a relationship is


treated as an entity set
Task week 4
Identify one case in Task previous week about
specialization or generalization or aggregation
concept the draw EER diagram for the case !
Reference
1. Fathansyah, 2012, Basis data edisi Revisi, Penerbit
Informatika.
2. Santiputri, Metta, 2012, Diktat Pengantar Basis
Data, Politeknik Negeri Batam
3. Widyastuti, Hilda, 2016, Diktat Pengantar Basis
Data, Politeknik Negeri Batam
4. Silberschatz, Abraham, 2006, Database System
Concepts, McGraw-Hill International Edition.
5. Kadir, Abdul., 2009, Dasar Perancangan dan
Implementasi Database Relasional, Penerbit
Andi.

You might also like