0% found this document useful (0 votes)
17 views

Jernesto David S. Villa PBDIT-Information Management Msit: Entity Relationship Diagram Exercises 1

Uploaded by

Critz villa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Jernesto David S. Villa PBDIT-Information Management Msit: Entity Relationship Diagram Exercises 1

Uploaded by

Critz villa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

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:

a. Entities (Division, Department, and Employee)


Attribute (Division – ID,Name, Department – ID, Name, Employee – ID, Name, Position)

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:

 The customer can rent more Video Tapes (1: Many)


 Video Tape can be rented by many (1: Many)
 Rental Associates the customer and Video Tapes
Diagram:

Diagram:

Customer RENTAL

ID ID
NAME RentalDate
Customer ID
VideoTape ID

Video Tapes

ID
TITLE

MANAGER

ID
RentalDate
Customer ID
VideoTape ID

c) Entities (Airlines, Flight, and Airliners)

Attribute (Airlines – ID,Name, Flight – ID,FlightNumber, FlightDate)

Relationships:

 Flight can be flown by 1 Airliners (1: 1)


 Airline can be assigned to Flights (1: Many)
Diagram:

Airlines Flies

ID Flight ID
Name Airliner ID

Flight
Airliners
ID
ID
Flight Number
Name
Flight Date
d) Entities (Factory, Region, Employee)

Attribute (Factory – ID,Name, Region – ID,Name, Employee – ID,Name)

Relationships:

 Operates many Factory (1: Many)


 Factory located in one location (Many: 1)
 Region can be home to many Factories (1: Many)
 Factory has many Employees (1: Many)
 Employee is employed to factory (1: 1)
Diagram:

Factory Employee

ID ID
Name
Name
Factory ID

Region

ID
Name

e) Entities (Employee, Degree)

Attributes (Employee – ID,Name, Degree – ID,Title)

Relationships:

 Employee earn many degree


 Degree earned by many employees
Diagram:

Employee Earn
ID Employee ID
Name EmployeeDegree

Degree Earned By
ID Degree ID
Name
Employee ID
Exercise 2

Entities (Customer, Employee, Project, and Equipment)

Attribute (Customer – ID,Name, Employee – ID,Name,Position, Project – ID,Name,Location, Equipment – ID,Type)

Relationship:

 Customer hires by the company for many (1: Many)


 Employees work for many project (1: Many)
 Equipment used/assign to 1 project (1:1)
Diagram:

Employee
Customer
ID
ID
Name
Name
Position

Project
Equipment
ID
Name ID
Location Type

Exercise 3

Entities (Reservation and Flight

Attributes (ReservationCode, Passenger Name, Seatnumber, Reservation Agent Number, Reservation agent name)

Relationships:

 Reservation is made for one seat (1:1)


 Fligh can have reservation (1: Many)

Diagram:
Exercise 4

Entities (Parents, Child, Room, and Employee)


Attribute (Parents – ID,Name, Child – ID,Name,Age, Room – ID,Age Group, Employee – ID,Name)
Relationship:
 Parents submit registration form (1: Many)
 Child is assigned in room (1:1)
 Room is assigned one or more Employees (1: Many)
Diagram:

You might also like