A Vehicle Manufacturer Database
These two slides show how to represent a vehicle manufacturer in the relational model and the problems with that model.
Companies
This entity has a name, head office, several subsidiaries, and a president.
Company |
CompanyID |
Name |
Street |
Location |
President |
|
The problems with this representation are
- Compound attributes:
For example, the head office can not be represented directly.
Therefore, the head office must be eliminated and replaced by
street
and location
.
- Set-valued attributes:
For example, subsidiaries must be differentiated from single-valued ones and represented in a different relational schema.
- Artificial key:
In order to establish a relationship between a company and its subsidiaries, an artificial key such as
CompanyID
will be necessary for obtaining a unique identification, because companies may carry the same company name in different countries.
Subsidiaries
It has a name, office, manager, and employees.
Subsidiary |
CompanyID |
NameSubs |
Street |
Location |
Manager |
|
The set-valued attribute employees requires a third relational schema.
“Perhaps the rare and simple pleasure of being seen for
what one is compensates for the misery of being it.”
― Margaret Drabble
|