CSCI 466/566 Assignment 2 Normalization solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

For each of the following, explain why or why not a relation is in a
particular normal form, underline primary keys and indicate which
fields are foreign keys and which relation they are keys into.
1.PetStore(storeBranchName, storeAddr, storeManager,(customerName,
customerAddr, customerPhone,(petName, petBreed, petSex, price) ) )
FDs
storeBranchName → storeAddr, storeManager
customerName → customerAddr, customerPhone
customerName, petName → petBreed, petSex
customerName,storeBranchName → petName
petBreed → price
a. Is this relation in 1NF? If not, why isn’t it? Then put it in 1NF.
b. Is this relation in 2NF? If not, why isn’t it? Then put it in 2NF.
c. Is this relation in 3NF? If not, why isn’t it? Then put it in 3NF.
2.R(A,B,C,D,E)
Fds
A → A,B,C
C → D
A,C → E
a. Is this relation in 1NF? Why or why not? If not, put it into 1NF.
2b. Is it now in 2NF? Why or why not? If not, put it into 2NF.
2c. Is it now in 3NF? Why or why not? If not, put it into 2NF.
Assignment 2 Normalization 1 of 2
3.price(product,sName,uPrice,qty,storeLocation,unitWeight)
Fds
product, sname → qty
sName → storeLocation
product → uprice, unitWeight
a. Is this relation in 1NF? If not, why isn’t it? Then put it in 1NF.
b. Is this relation in 2NF? If not, why isn’t it? Then put it in 2NF.
c.Is this relation in 3NF? If not, why isn’t it? Then put it in 3NF.
4.person(personId, name, country,(phone, type))
FDs
personId → name, country, phone
name → country
phone → type
a. Is this relation in 1NF? If not, why isn’t it? Then put it in 1NF.
b. Is this relation in 2NF? If not, why isn’t it? Then put it in 2NF.
c. Is this relation in 3NF? If not, why isn’t it? Then put it in 3NF.
5.carTheft(VID,vehicleType,(ownerID,ownerName),
(suspectId,suspectName))
FDs
VID → vehicleType, ownerID
ownerId → ownerName
suspectID → suspectName
a. Is this relation in 1NF? If not, why isn’t it? Then put it in 1NF.
b. Is this relation in 2NF? If not, why isn’t it? Then put it in 2NF.
c. Is this relation in 3NF? If not, why isn’t it? Then put it in 3NF.
Assignment 2 Normalization 2 of 2