You are on page 1of 4

FACULTY OF COMPUTER SYSTEMS & SOFTWARE

MARKS:

ENGINEERING
COURSE: Data Management CODE: MCT1023

TOPIC: Entity Relationships Modeling


ASSESSMENT: Lab
Sheet

NUM:
2

DURATION: 2 hours

10

SEM I 2014/2015

LEARNING OUTCOMES
Upon the completion of this lab session, students will have the ability to translate business rules
into ERD.
QUESTION:
1. MV Electric wishes to create a database with the following entities and attributes:
a. CUSTOMER, with attributes Customer_ID, Name, Address (Street, City, State,
Zip Code), Telephone.
b. LOCATION, with attributes Location_ID, Address (Street, City, State, Zip
Code), Type (values of Business or Residential).
c. RATE, with attributes RateClass, Rateperkwh.
After interviews with the owners, you have come up with the following business
rules:

CUSTOMER can have one or more locations.

Each LOCATION can have one or more rates, depending on the time of day.

Draw an ERD for this situation, and place minimum and maximum cardinalities on the
diagram.

2. Given the following business rules, identify the suitable attributes and create the
Crows Foot ERD. You are required to model all entity classes, relation classes,
cardinalities and (possibly) dependability of existence and weak entity classes.
Case 1: Business rules
a. A company operates many departments.
b. Each department employs one or more employees.
c. Each of the employees might or might not have one or more dependents.
d. Each employee might or might not have an employment history

Case 2: Business rules for Little League baseball program:


a. A City sponsor one or more teams, but each team is only sponsored by only one
city.
b. A team has many players, but each player plays for only one team.
c. It takes at least 10 players to make a team.
d. Each team plays each of the other teams twice, one at home and once as the
visiting team.
Case 3: Business rules:
a. An INVOICE is written by a SALESREP. Each sales representative can write
many invoices, but each invoice is written by a single sales representative.
b. The INVOICE is written for a single CUSTOMER. However, each customer can
have many invoices.
c. An INVOICE can include many detail lines (LINE), each of which describes one
product bought by the customer.
d. The product information is stored in a PRODUCT entity.
e. The products vendor information is found in a VENDOR entity.

Question 1
CUSTOMER
CustomerID (PK)
Name
Address

have
1..1

1..*

LOCATION
LocationID (PK)
Address
Street

Street

City

City

State

State

ZipCode

ZipCode
Telephone

Type
Business
Residential

Question 2
Case 1

\
Case 2
3

have
1..1

1..*

RATE
RateClass
RatePerKwh

Case 3