Professional Documents
Culture Documents
Database Technology
A taxi company needs to model their activities.
There are two types of employees in the company: drivers
and operators. For drivers it is interesting to know the date
Topic 3: Enhanced Entity- of issue and type of the driving license, and the date of
issue of the taxi drivers certificate. For all employees it is
Relationship (EER) Modeling interesting to know their personal number, address and the
available phone numbers.
The company owns a number of cars. For each car there is
Olaf Hartig a need to know its type, year of manufacturing, number of
olaf.hartig@liu.se places in the car and date of the last service.
The company wants to have a record of car trips. A taxi
may be picked on a street or ordered through an operator
who assigns the order to a certain driver and a car.
Departure and destination addresses together with times
should also be recorded.
Database Technology
Topic 3: Enhanced Entity-Relationship (EER) Modeling 2
ER diagram
Diagrammatic notation associated with the ER model
Street Model
City
RegNumber
Year
Name SSN Name
Address
1 N
SSN Owner owns Car
Owner PhoneNumber
Age
1 N
Owner owns Car
N M
Owner owns Car
Company
SellDate Model Employee JobType
N N M
Name works at
BuyDate RegNumber works as
Year
M
SSN Employee
K
Ternary
N M N
Owner owns Car Company
works as
M
JobType
name
name number
1 N
Team plays_in Player
Database Technology
Topic 3: Enhanced Entity-Relationship (EER) Modeling 16
generalization
Surname
FirstName
Disjointness constraint
PN
Name Specifies that the subclasses of the specialization must be disjoint
Otherwise overlapping
process of Completeness constraint (or totalness constraint)
Employee
defining
types Specifies that every superclass entity must be in a subclass
Otherwise partial
d o
U
RegNumber
ReportID
Database Technology Database Technology
Topic 3: Enhanced Entity-Relationship (EER) Modeling 17 Topic 3: Enhanced Entity-Relationship (EER) Modeling 18
Example
A taxi company needs to model their activities.
There are two types of employees in the company: drivers
and operators. For drivers it is interesting to know the date
of issue and type of the driving license, and the date of
issue of the taxi drivers certificate. For all employees it is
interesting to know their personal number, address and the
Example available phone numbers.
The company owns a number of cars. For each car there is
a need to know its type, year of manufacturing, number of
places in the car and date of the last service.
The company wants to have a record of car trips. A taxi
may be picked on a street or ordered through an operator
who assigns the order to a certain driver and a car.
Departure and destination addresses together with times
should also be recorded.
Database Technology
Topic 3: Enhanced Entity-Relationship (EER) Modeling 22
TaxiCertifDate o
U
Date Type
DrivingLicenseDate
Driver Operator
Id TaxiCertifDate
DrivingLicenseType 1 1
N 1
drives assign Krkort
DrivingLicense belongsTo Driver
N
DepTime Type
N TaxiCertifDate
YearOfManuf
DeparturePlace Trip
RegNumber Type
Destination ServiceDate N M
DestTime N DrivingLicense belongsTo Driver
Places
ID made_by 1 Car Date
Summary
Entity-relationship (ER) model: a graphical way to
model the world
Main concepts:
Entity type
Database Technology
Topic 3: Enhanced Entity-Relationship (EER) Modeling 26