Jernesto David S. Villa PBDIT-Information Management Msit: Entity Relationship Diagram Exercises 1
Jernesto David S. Villa PBDIT-Information Management Msit: Entity Relationship Diagram Exercises 1
Exercise 1
Create ERD for each of the following descriptions. (Note that the word “many” is meant to mean “more than
one” in a database modelling environment.)
a) Each of the MegaCo Corporation’s divisions is composed of many departments. Each of the departments
has many employees assigned to it, but each employee works for only one department. Each department is
managed by one employee, and each of these managers can manage only one department at a time.
b) During some period of time, a customer can rent many videotapes from the BigVid store. Each of the
BigVid’s videotapes can be rented to many customers during that period of time.
c) An airline can be assigned to fly many flights, but each flight is flown by only one airliner.
d) The KwikTite Corporation operates many factories. Each factory is located in a region. Each region can be
“home” to many of KwikTite’s factories. Each factory employs many employees, but each of these employees is
employed by only one factory.
e) An employee may have earned many degrees, and each degree may have been earned by many
employees.
Answer:
Relationships:
The Division has many Departments (1: Many)
Department has many Employees (1: Many)
Employees works for one department (1:1)
Department can be managed by 1 Employee (1:1)
Diagram:
DIVISION DIVISION
ID ID
NAME NAME
POSITION
DEPARTMENT
ID
NAME
MANAGER
Emplyee ID
Department ID
b) Entities (Customer, Video Tape, Rental)
Attribute (Customer - ID,Name, Video Tape – ID, Title, Rental – ID, Rental Date)
Relationships:
Diagram:
Customer RENTAL
ID ID
NAME RentalDate
Customer ID
VideoTape ID
Video Tapes
ID
TITLE
MANAGER
ID
RentalDate
Customer ID
VideoTape ID
Relationships:
Airlines Flies
ID Flight ID
Name Airliner ID
Flight
Airliners
ID
ID
Flight Number
Name
Flight Date
d) Entities (Factory, Region, Employee)
Relationships:
Factory Employee
ID ID
Name
Name
Factory ID
Region
ID
Name
Relationships:
Employee Earn
ID Employee ID
Name EmployeeDegree
Degree Earned By
ID Degree ID
Name
Employee ID
Exercise 2
Relationship:
Employee
Customer
ID
ID
Name
Name
Position
Project
Equipment
ID
Name ID
Location Type
Exercise 3
Attributes (ReservationCode, Passenger Name, Seatnumber, Reservation Agent Number, Reservation agent name)
Relationships:
Diagram:
Exercise 4