Está en la página 1de 7

Lab Activity 4 : Entity Relationship Diagram

Duration: 4 Hours

Learning Outcomes
This activity encompasses activities 4A, 4B and 4C
At the end of this activity session, you should be able to:
1. Identify the basic elements of ERD.
2. Design E-R Diagram based on a given scenario by using Chens Model and
CrowFoot
3. Convert a given ERD into relational tables.

Activity 4A
Activity Outcome: Identify the basic elements of ERD and design the ERD based on a given
scenario by using Chens Model.
Nena Electrical Co. Wishes to create a database with the following entities and attributes:
a. Customer, with attributes: CustomerID, Name, Email, Telephone
b. Location, with attributes: LocationID, Address, Type
c. Rate, with attributes: , RateID, RateClass, Rateperkwh
After the interviews with the owner you have come up with the following business rules:
Customer can have one or more locations
Each location can have one and only one customer
Each location can have one or more rates
Each rate may be used at many locations, or not used at a location
1. Identify all the basic elements of ERD that are involved based on the above scenario:
a) Entity and Attribute
Entity

Customer
Location
Rate

Attribute

CustomerID, Name, Email, Telephone


LocationID, Address, Type
RateID, RateClass, Rateperkwh

b) Relationship, Connectivity and Cardinality

Customer

Location

has

Location

use

Rate

c) Identifier keys
Entity

Customer
Location
Rate

Primary Key

CustomerID
LocationID
RateID

2. Draw the E-R Diagram using Chens Model based on the Activity4A(1) that you have
identified.

Activity 4B
Activity Outcome: Identify the basic elements of ERD and design the ERD based on a given
scenario by using Crows Foot.
An automobile insurance company needs to keep track of information about vehicle. The
company has to store information of customer, car and accident. Customer information is
LicenseNo, name and address. Customers can own one or more cars, where the car
information is PlateNo, model and year. A car not involved or involved in many accidents. If the
car is involved in an accident, the information that will be stored is Report_number, location and
date.
1. Identify all the basic elements of ERD that are involved based on the above scenario:
a) Entity and Attribute
Entity

Customer
Car
Accident

Attribute

LicenseNo, Name, Address


PlateNo, Model, Year
ReportNumber, Location, Date

a) Relationship, Connectivity and Cardinality

Customer

Car

own
Car
involve
Accident

b) Identifier keys
Entity

Customer
Car
Accident

Primary Key

LicenseNo
PlateNo
ReportNumber

2. Draw the E-R Diagram using Chens Model based on the Activity4B(1) that you have
identified.

Activity 4C
Activity Outcome: Convert a given ERD into relational tables.
1. Convert the E-R Diagram based on the Activity 4A(2) into the relational tables.

CustomerID

Customer
Telephone Name

Email

LocationID

Location
Address
_ _ _ _ _Type
_

CustomerID

__
Rate
RateClass

RateID

RateID

Rateperkwh

Use
LocationID

2. Convert the E-R Diagram based on the Activity 4B(2) into the relational tables.

LicenseNo

PlateNo

Model

Customer
Name

Address

Car
Year

Car_Accident
PlateNo
ReportNumber
Accident
ReportNumber Location Date

______
LicenseNo
__

Activity 4D
Activity outcome : Using Chen Model Notation, Draw the ERD for the given scenario below.
There are many soccer teams in Liga Super Malaysia ; each team has an ID,name,main
stadium, and which city this team belongs.Each team has many players,and each player
belongs to one team.Each player has a number,name,DOB,start year and shirt number that he
uses.Teams play matches, for each match you need to keep track the date on which the game
is played, match ID and the final result of the match.Each match has exactly three referees.For
each referee have an referee ID,name,DOB and year of experience.
(10 Marks)

Activity 4E
Activity outcome : Using Crows Foot Model Notation, Draw the ERD for the given scenario
below.

Seremban Hospital has several wards. This hospital has a few types of ward depends on types
of patients. Patient information will be recorded into file that patient number, patient name,
address, phone number, IC number, patient and group of blood patient. Each patient is treated
by a doctor at one time but one doctor can treats a number of patients. The information of
doctors recorded are : doctor ID, doctor name, address, phone no, IC no and expertise. The
nurses will be assigned to take care of the patients. Nurses in this hospital are graded based on
their experience, qualification and duration of working in the hospital.

(10 Marks)

También podría gustarte