Data Analysis 2: DR Gordon Russell
Data Analysis 2: DR Gordon Russell
Chapter 2.2
V3.0
Copyright @ Napier University
Dr Gordon Russell
Entity Relationship Modelling - 2
Overview
• construct an ER model
• understand the problems associated with ER
models
• understand the modelling concepts of Enhanced
ER modelling
Country Bus Company
is garaged m is serviced by
Bus n Route
has
m
Garage
Stage n
Driver
m n is allocated
is situated in Town passed through
Attributes
• Bus (reg-no,make,size,deck,no-pass)
• Route (route-no,avg-pass)
• Driver (emp-no,name,address,tel-no)
• Town (name)
• Stage (stage-no)
• Garage (name,address)
Problems with ER Models
1. fan traps
2. chasm traps
Fan traps
works for is on
Staff Department Site
n m
Chasm traps
is_allocated oversees
Branch Staff Property
n 0 0
Chasm traps cont...
is_allocated n 0 oversees
Staff
0
Branch Property
has
Enhanced ER Models (EER)
• Specialisation
• Generalisation
• Categorisation
• Aggregation
EER Models cont...
Manager Secretary
Sales
Personnel
Staff
EER Models cont...
• Staff(staff_no,name,address,dob)
• Manager(bonus)
• Secretary(wp_skills)
• Sales_personnel(sales_area, car_allowance)
Specialisation cont...