Normalization Assignment
Normalization Assignment
a. {W->Y,X->Z}|= {WX->Y}
w->Y (GIVEN)
w->YX (AUGMENTATION ON 1)
W->Y (DECOMPOSITION)
X->Y (Given)
Y->Z (REFLEXIVE ON Z (SUBSET OF Y))
c. {X->Y,X->W,WY->Z} |={X->Z}
WY->Z (GIVEN)
X->W (GIVEN)
X->Y (GIVEN)
WX->Z (IR6 ON 1)
X->Z
d. {XY->Z,Y->Z}|={XW->Z}
DISPROVE
e. {X->Z,Y->Z}|={X->Y}
DISPROVE
f. {X->Y,XY->Z}|= {X->Z}
X->Y (GIVEN)
XY->Z (GIVEN)
XX->Z (IR6 ON2)
X-Z (XX=X)
g. {X->Y,Z->W}|= {XZ->YW}
X->Y (GIVEN)
Z->W (GIVEN)
XZ->XW (IR2 ON3)
XZ->YW (IR6 ON3)
h. {XY->Z,Z->X} |= {Z->Y}
XY->Z (GIVEN)
Z->X (GIVEN)
XY->X (IR3 ON 1 AND 2)
XY->XY (IR2 ON 3)
Z->XY (IR6 ON 4)
Z->Y (IR4 ON 5)
i. {X->Y,Y->Z} |= {X->YZ}
X->Y (GIVEN)
Y->Z (GIVEN)
X->Z (IR3 ON 1 AND 2)
X->YZ (IR5 ON 3)
j. {XY->Z,Z->W}|={X->W}
DISPROVE
2. Consider the following two sets of functional dependencies check whether they
are equivalent or not:
SOLUTION:
3. Considering the model EMP_DEPT schema in Fig 10.3a and the following set G
of functional dependencies on EMP_DEPT:
G{SSN-> {Ename,Bdate,Address,DNumber} , DNumber->{Dname,Dmgrssn}}.
Calculate the closures {SSN}+ and {DNumber}+ with respect to G.
CLOSURE OF SSN
{SSN}+={SSN,Ename,Bdate,Address,DNumber,DName,Dmgr
ssn}
CLOSURE OF DNUMBER
{DNumber}+={DNumber,DName,Dmgrssn}
4. Is the set of dependencies G is minimal? If not, try to find a minimal set equivalent
to G. Prove that it is equivalent to G.
LEFT 4 U
5. What update anomalies occur in the Emp_Proj and Emp_Dept relations of Fig.
10.3 and Fig.10.4?
LEFT 4 U
6. Prove that any relation schema with two attributes is in BCNF
R(A,B)
1. A attribute is Primary key and B is candidate
2. if A->B
B->A
Then it is in BCNF
a. F1={{A,B}->{C},{B,D}->{E,F},{A,D}->{G,H},{A}->{I},{H}->{I}}
b. F2={{A,B}->{C},{A}->{E,D},{B}->{F},{F}->{G,H},{D}->{I,J}}
Closure Set
A
{A,B}+={A,B,C,I} PD1
{B,D}+={B,D,E,F} PD2
{A,D}+={A,D,G,H} PD3
R1 (A,B,C,I) 2NF,3NF
R2 (B,D,E,F) 2NF,3NF
R3 (A,D,G,H,T) 2NF
R4 (A,B,D) 2NF,3NF
Closure Set
R1 (A,D,E) 2NF
R2 (B,F) 2NF
R3 (A,B,C,G,H,I,J) 2NF,3NF
R1 further breaks into R11 and R12
R11 (D,I,J)
R12 (A,E,D)
Closure Set
{AB}+={A,B,C}
{CD}+={C,D,E,B}
{DE}+={D,E,B}
Q9- Consider the relation schedule (stdid, classno, stdname, stdmajor, classtime,
room, instructor) and the set
F={ stdid{stdname, stdmajor}, classno{classtime, room, instructor } }
A. Closure Set
{stdId}+={stdName,stdMajor}
{classNo}+={classTime,room,instructor}
Key is {StdId,ClassNo}
D. Removing PFD
R Breaks into R1(PFD1),R2(PFD2),R3(Remaining)
R1 (stdid,stdname,stdmajor)
R2 (classNo,room,instructor)
R3 (stdid,classno)
Q 10. Consider the relation ProgrammerTask (prog-id, programmer-package-id,
Programming-package-name, total-hours-worked-on-package) and the set
F= { programming-package-id programming-package-name,
{progid, Programming-package-id} total-hours-worked-on-package }
a. What is the key of this relation Prove it.
b. What is the highest normal form of this relation? Give reason.
c. Transfer this relation to its next higher form.
A. Closure set
{progid-programming –package-id}+={progid,programming
– package-id,total-hours-worksed –on-package}
{ programming –package-id }+={ programming –package-id
, package-name}
Q11. Consider the relation SALES(tranno, itemno, price, qty, seller, sregion) and the
set F= { {tranno,itemno} qty, itemnoprice, trnsnoseller, sellersregion}
a. What is the KEY of this relation? Prove it.
b. What is the highest normal form of this relation? Give reason.
c. If it is not in 3NF find a decomposition that is lossless and dependency
preserving.
A.Closure Set
{tranno,itemno}+={tranno,itemno,qty,price,seller,sregion}
{tranno}+={tranno,seller,sregion}
{itemno}+={itemno,sregion}
{seller}+={sregion}
Key is {tranno,itemno}
C. Decomposing
R into R1,R2 and R3
R1 (tran#,seller,sregion) 2NF
R2 (item#,price) 3NF
Decompse R1 into R11(T.D) and R12(Remaining)
R11 (Seller,Sregion) 3NF
R12 (tran#,seller) 3NF
Now it is Loss Less and Perserved.
Q 12. Consider the relation TECH (student, course, instructor) and the set
F= { {student,course} instructor, instructorcourse }
A. Closure Set
{student,course}+={student,course,instructor}
{instructor}+={instructor,course}
Key is {student,course}
http://www.ravianeducation.blogspot.com
FARHAN: 03008855006