100 Normalization In-Class Exercise Dinner with Answers PDF

Title 100 Normalization In-Class Exercise Dinner with Answers
Course Business Systems Analysis and Design
Institution 香港浸會大學
Pages 5
File Size 256.3 KB
File Type PDF
Total Downloads 123
Total Views 1,016

Summary

Normalization In-Class Exercise 1. Convert the Big Patient Table into 3rd normal form. The functional dependencies are shown in Table 2 for your reference. Draw the functional dependency diagram, and show the result of each step in the normalization process. Table 1 Sample Data for the Big Patient T...


Description

Normalization In-Class Exercise

1. Convert the Big Patient Table into 3rd normal form. The functional dependencies are shown in Table 2 for your reference. Draw the functional dependency diagram, and show the result of each step in the normalization process. Table 1 Sample Data for the Big Patient Table VisitNo

VisitDate

PatNo

PatAge

PatCity

ProvNo

ProvSpecialty

Diagnosis

V10020 V10020 V93030 V82110

1/13/2007 1/13/2007 1/20/2007 1/18/2007

P1 P1 P3 P2

35 35 17 60

DENVER DENVER ENGLEWOOD BOULDER

D1 D2 D2 D3

INTERNIST NURSE PRACTIONER NURSE PRACTIONER CARDIOLOGIST

EAR INFECTION INFLUENZA PREGNANCY MURMUR

Table 2 Functional Dependency in the Big Patient Table PatNo  PatAge, PatCity ProvNo  ProvSpecialty VisitNo  PatNo, VisitDate, PatAge, PatCity VisitNo, ProvNo  Diagnosis

Qu e s t i on1Ans we r

T D

B ig P atie n t ( V is itN o . V is itD ate P atN o P a tA g e P a tC ity

PD

P r o vN o P ro vS p e c ialty

PD

1NF Big Patient (VisitNo., VisitDate, PatNo, PatAge, PatCity, ProvNo, ProvSpecialty, Diagnosis) 2NF PatientVisit (VisitNo., VisitDate, PatNo, PatAge, PatCity) Provider (ProvNo, ProvSpecialty) [Already in 3NF] VisitProvDiagnosis(VisitNo., ProvNo, Diagnosis) [Already in 3NF]

3NF Patient (PatNo, PatAge, PatCity) PatientVisit (VisitNo., VisitDate, PatNo) Provider (ProvNo, ProvSpecialty) VisitProvDiagnosis(VisitNo., ProvNo, Diagnosis)

D iag n o s is )

2 The manager of a company dinner club would like to have an information system that assists him to plan the meals and to keep track of who attends the dinners, and so on. Because the manager is not an IS expert, the following table is used to store the information. As a member can attend many dinners and a member will not attend more than 1 dinner on the same date, the primary key of the following table is Member Num + Dinner Num. Dinners can have many courses, from one-course dinner to as many courses as the chef desired. MEMBER NUM

MEMBER NAME

214

Peter Wong

235

250

235

300

Mary Lee

Peter Wong

Mary Lee

Paul Lee

MEMBER ADDRESS 325 Meadow Park

123 Rose Court

9 Nine Ave

123 Rose Court

123 Rose Court

DINNER NUM

DINNER DATE

VENUE CODE

VENUE DESCRIPTION

FOOD CODE

FOOD DESCRIPTION

D0001

15-Mar-10

B01

Grand Ball Room

EN3

Stuffed crab

DE8

Chocolate mousse

EN5

Marinated steak

DE8

Chocolate mousse

SO1

Pumpkin soup

EN5 DE2

Marinated steak Apple pie

SO1

Pumpkin soup

EN5 DE2

Marinated steak Apple pie

SA2

Apple pie

D0002

D0003

D0003

D0004

15-Mar-10

20-Mar-10

20-Mar-10

20-Mar-10

B02

C01

C01

E10

Petit Ball Room

Café

Café

Petit Ball Room

* This table has only 5 records. a. b. c. d.

Use proper notation to write down the above table. Use “Member Dinner” as the table name. Convert the above Member Dinner table into 1st Normal Form table. Assuming you can identify the functional dependencies from the table; draw a functional dependencies diagram for the 1st NF table. Develop a set of 3NF tables. Show every step of normalization along the way.

a.

Member Dinner (MEMBER NUM, MEMBER NAME, MEMBER ADDRESS, DINNER NUM, DINNER DATE, VENUE CODE, VENUE DESCRIPTION, 1{FOOD CODE, FOOD DESCRIPTION}n)

b. The First Normal Table is:

Member Dinner Food (MEMBER NUM, MEMBER NAME, MEMBER ADDRESS, DINNER NUM, DINNER DATE, VENUE CODE, VENUE DESCRIPTION, FOOD CODE, FOOD DESCRIPTION) Note: The following table is not part of the answer. I put it here just to help you understand. MEMBER NUM

MEMBER NAME

214

Peter Wong

214

Peter Wong

235

Mary Lee

MEMBER ADDRESS 325 Meadow Park 325 Meadow Park 123 Rose Court

235

Mary Lee

123 Rose Court

250

Peter Wong

9 Nine Ave

250

Peter Wong

9 Nine Ave

250

Peter Wong

9 Nine Ave

235

Mary Lee

123 Rose Court

235

Mary Lee

123 Rose Court

235 300

Mary Lee Paul Lee

123 Rose Court 123 Rose Court

DINNER NUM D0001

DINNER DATE

VENUE CODE

VENUE DESCRIPTION

FOOD CODE

FOOD DESCRIPTION

15-Mar-10

B01

Grand Ball Room

EN3

Stuffed crab

15-Mar-10

B01

Grand Ball Room

DE8

Chocolate mousse

15-Mar-10

B02

Petit Ball Room

EN5

Marinated steak

15-Mar-10

B02

Petit Ball Room

DE8

Chocolate mousse

20-Mar-10

C01

Café

SO1

Pumpkin soup

D0003 D0003 D0003

20-Mar-10

C01

Café

EN5

Marinated steak

20-Mar-10

C01

Café

DE2

Apple pie

20-Mar-10

C01

Café

SO1

Pumpkin soup

D0003 D0003 D0004

20-Mar-10

C01

Café

EN5

Marinated steak

20-Mar-10 20-Mar-10

C01 E10

Café Petit Ball Room

DE2 SA2

Apple pie Apple pie

D0001 D0002 D0002 D0003

c.

Partial Dependency (PD)

MEMBER NUM

MEMBER NAME

MEMBER ADDRESS

Partial Dependency (PD)

DINNER NUM

DINNER DATE

VENUE CODE

Partial Dependency (PD)

VENUE DESCRIPTION

FOOD CODE

FOOD DESCRIPTION

Transitive Dependency (TD)

d. Second Normal Form: Member Dinner Food (MEMBER NUM, DINNER NUM, FOOD CODE) Member (MEMBER NUM, MEMBER NAME, MEMBER ADDRESS)

(already in 3NF) (already in 3NF)

Dinner (DINNER NUM, DINNER DATE, VENUE CODE, VENUE DESCRIPTION) Food (FOOD CODE, FOOD DESCRIPTION) (already in 3NF)

Third Normal Form: Member Dinner Food (MEMBER NUM, DINNER NUM, FOOD CODE) Member (MEMBER NUM, MEMBER NAME, MEMBER ADDRESS) Dinner (DINNER NUM, DINNER DATE, VENUE CODE) Food (FOOD CODE, FOOD DESCRIPTION) Venue (VENUE CODE, VENUE DESCRIPTION)...


Similar Free PDFs