labsheet#2 - erd (amirafatiha kct15005)

Upload: amira-eira

Post on 08-Jan-2016

223 views

Category:

Documents


0 download

DESCRIPTION

a

TRANSCRIPT

Jawab Semua Soalan:

FACULTY OF COMPUTER SYSTEMS & SOFTWARE ENGINEERINGMARKS:

/10

COURSE: Data ManagementCODE: MCT1023

TOPIC: Entity Relationships Modeling

ASSESSMENT: Lab SheetNUM: 2DURATION: 2 hours

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 1CUSTOMERhaveLOCATIONhaveRATE

CustomerID (PK)

Name

Address

Street

City

State

ZipCode

Telephone1..1 1..*LocationID (PK)

Address

Street

City

State

ZipCode

Type

Business

Residential1..1 1..*

RateClass

RatePerKwh

Question 2Case 1

\

Case 2

Case 3PAGE 4