You are on page 1of 4

1.

Create an ERD for each of the following description

1..M M…M
0…M 1…1

A. Each company operates four departments and each department belongs to one company.

Operates belongs

1..1 1..M
company department

B. Each department in part A employs one or more employees and each employee works for
one department
employ work

department 1…1 1..M


employee

C. Each of the employees in part B may or may not have one or more dependents and each
depended belongs to one employee

has belongd
1…1 0…M
employee dependent

D. Each employee in part C may or may not have an employment history

has
1…1 O…M
employee Employment_history

E. Represent all ER diagram described in A,B,C, and D as a single ER Diagram


Operates belong employ works

1..1 1..M 1..1 1..M

company
department employee

1..1

Has 1..1

1..M

O..M belong

Employment_history
dependent

2. Determine the entities, relationships and cardinality of the following


A. A customer can rent many DVDs from a Video store. Each of the DVDs can be rented to
many customers during the period of time.

rent
customer M..M 1..M
Video Store
B. An airline can be assigned to fly many flights but each flight is flown by only one airline.

1..1 Assigned 1…M


airline flight

C. A company operates many factories. Each factory is located in a region. Each region can be a
“home” to many factories. Each factory employs many employees but each of these
employees is employed by only one factory.

3. An employee may have earned many degrees and each degree has been earned by many
employees

M…M Earned M..M


employee degree

4. Emerging Electric wishes to create a database with the following entities and attributes:
 CUSTOMER. identifier Cust_ID, attributes Cust_Name, Address composed of Street, City,
Zip_Code and Cust_Telephone
 LOCATION. Identifier Location_ID, Attributes Address composed of Street, City, Zip_Code and
Type (value is Residential or Business)
 RATE. Attributes are Rate_Class and RatePerKWH
After interview with the owner, you 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 ERD for this situation and place minimum and maximum cardinalities on the diagram.
CUSTOMER
LOCATION
Cust_ID
1…1 RESIDES 1..M Location_ID
Cust_Name{
Address{
FN,MN,LN}
Street, City, Zip_Code
Address{
Type}
Street, City, Zip_Code}
M..M
Cust_Telephone{

C_CODE
A_CODE CAN HAVE (VARIES)
TEL_NO}

1..M

RATE

Rate_Class
RatePerKWH

You might also like