0% found this document useful (0 votes)
5 views2 pages

Activity4 Solutions

The document outlines a class activity on database normalization for a course at Qatar University. It includes exercises on creating relational schemas and normalizing them to the Third Normal Form (3NF) for order and patient data. Additionally, it discusses the normalization of a relation for published books, detailing the steps to achieve 1NF, 2NF, and 3NF.

Uploaded by

cexoyat628
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Activity4 Solutions

The document outlines a class activity on database normalization for a course at Qatar University. It includes exercises on creating relational schemas and normalizing them to the Third Normal Form (3NF) for order and patient data. Additionally, it discusses the normalization of a relation for published books, detailing the steps to achieve 1NF, 2NF, and 3NF.

Uploaded by

cexoyat628
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ar Universitty

Qata Fundam
mental of Daatabase Sysstems
Dept. of Compu uter Sciencce & Engin
neering (CMPS S351)
Sp
pring 2018
Classs Activitty on (N
Normalizaation)

1)) Assume yyou have to create dataabase that traacks the


data of thhe orders as the followinng form.

1- What is the relatiional schem


ma correspon
nding to
the Orrder form?
2- Normmalize this too the 3NF.

ORDER(ordeer#, custom mer#, name, address,


orrderdate(prooduct#,description, quaantity, unitprice))

NF
1N
ORDE ER(order#, product#, customer#,
c n
name,
ad
ddress, ordeerdate, descrription, quanntity, unitprrice)
2N
NF
ORDE ER(order#, customer#,, name, addrress, orderddate)
ORDE ER_LINE(oorder#, prodduct#, quanttity)
PROD DUCT(prod duct#, description, unitpprice)
3N
NF
ORDE ER(order#, customer#,, orderdate)
CUST TOMER(cu ustomer#, naame, addresss)
ORDE ER_LINE(oorder#, prodduct#, quanttity)
PROD DUCT(prod duct#, description, unitpprice)

2)) Convert eeach of the following


f schemas to 3NF,
3 showinng all interm
mediate stagges, that is, 1NF and
2NF.

PA
ATIENT (P Patient#, Name, DOB, Address,
A (P
Prescription##, Drug, Daate, Dosage,, Doctor#, D
Doctor,
Seecretary))

1N
NF

PATIENT (Patieent#, Name, DOB, Adddress, Prescrription#, Drrug, Date, Dosage,


D Docctor#, Doctoor,
Secretary)
2N
NF
Prescrription(Presscription#, Drug,
D Date, Dosage, Doctor#,
D Dooctor, Secrettary, Patientt#)
PATIENT (Patieent#, Name, DOB, Adddress)
3N
NF
Prescrription(Presscription#, Drug,
D Date, Dosage, Doctor#,
D Pattient#)
PATIENT (Patieent#, Name, DOB, Adddress)
Doctoor#, Doctor,, Secretary
Q3) Consider the following relation for published books:

BOOK (Book_title, Author_name, Book_type, List_price, Author_affil,Publisher).


Suppose the following dependencies exist:
Book_title  Publisher, Book_type
Book_type  List_price
Author_name Author_affil
a. What normal form is the relation in? Explain your answer.
b. Apply normalization to the 3NF if it is not

Assuming the PK is Book_title, and Author_name, , this relation will be in 1NF because there is no
multi_values , composite or nested attribute.

2NF
BOOK (Book_title, Book_type, List_price, Publisher)
Author(Author_name, Author_Affil)
Author_Book(Auther_name, Book_title)
3NF
BOOK (Book_title, Book_type, Publisher)
Type_Price(Book_type, List_price)
Author(Author_name, AuthorAffil)
Author_Book(Auther_name, Book_title)

You might also like