Database ERD Practice Cases
Database ERD Practice Cases
Bus – Company owns buses and will hold information about them.
Route – Buses travel on routes and will need described.
Town – Buses pass through towns and need to know about them.
Driver – Company employs drivers, personnel will hold their data.
Stage – Routes are made up of Stages. Garage –
Garage houses buses, and need to know where they are.
Relationships
Airline Example
Major airlines companies that provide passenger services in Taiwan are: UniAir, TransAsia Airways, Far
Eastern Transport, Great China Airlines etc. Taiwan’s Federal Aviation Administration (TFAA) keeps a
database with lots of information on all airlines. This information is made accessible to all airlines in Taiwan
with the intention of helping the Companies assess their Competitive position in the domestic market. The
information kept consists of:
1. Each airpline has an identification number, name of the contact person and telephone number.
2. For each aircraft identification number, capacity and model is recorded.
3. Each employee has an employee identification number, name, address, birthday, sex, position with
the company and qualification.
4. Each route has a route identification number, origin, destination, classification (into domestic or
international route), distance of the route and price charged per passenger.
5. Each airline keeps information about their buy/sell transactions (for example, selling an airplane
ticket is a sell transaction, paying for maintenance is a buy transaction). Each transaction has a
transaction identification number, date, description and amount of money paid/received.
institution Example
This database includes information about the course timetable of an academic institution. For each Course
the following information is recorded an identification number, name of the course, name of the teacher
assigned to teach the course, the number of periods each week it will be taught, the number of students.
For each teacher the following information is recorded: SSN, name, name of the department he/she works
with, skills, the yearly salary. For each class period the following information is recorded: period number,
starting time, ending time. For each room the following information is recorded: room number, room type
(classroom, office, auditorium, and computer lab), capacity.
The above information is used in order to make the right assignment of a teacher that teaches a particular
course to a time period and a classroom. Draw an E-R diagram for this database. State clearly any
assumptions you make.