Download presentation
Presentation is loading. Please wait.
1
Plan for Today Normal forms
Feedback from slides: Explain 3nf/bcnf examples Clarify dependency preservation Kahoot: 4efa a2a58e5cf Class worksheet – question 1 Lossless decompositions Class worksheet – question 2 Dependency preserving decompositions
2
Question 1 Find a (minimal) key Z of R
For each nontrivial FD X⟶Y in F { If X is not a superkey then { For each A in Y\X { If A is not in Z then return false } Return true
3
state,city,street⟶zip, zip⟶state
Question 1 (cont’d) If the algorithm returns true, then 3NF The other direction is not necessarily true state,city,street,zip state,city,street⟶zip, zip⟶state Z = {city , street , zip}
4
Question 1 (cont’d) Find all (minimal) keys of R and let Z be the union For each nontrivial FD X⟶Y in F { If X is not a superkey then { For each A in Y\X { If A is not in Z then return false } Return true
5
AB, BC, CD Question 2 (a) (A,B,C,D) A⟶B, B⟶C, D⟶A A B C D a1 a2 x13
6
AB, BC, CD Question 2 (a) (A,B,C,D) A⟶B, B⟶C, D⟶A A B C D a1 a2 a3 x14
7
AB, BC, CD Lossy! Question 2 (a) (A,B,C,D) A⟶B, B⟶C, D⟶A A B C D a1 a2
x14 x21 x24 x31 x32 a4 Lossy!
8
AB, BC, AD Question 2 (b) (A,B,C,D) A⟶B, B⟶C, D⟶A A B C D a1 a2 x13
9
AB, BC, AD Question 2 (b) (A,B,C,D) A⟶B, B⟶C, D⟶A A B C D a1 a2 x13
10
AB, BC, AD Lossless! Question 2 (b) (A,B,C,D) A⟶B, B⟶C, D⟶A A B C D a1
x13 x14 x21 a3 x24 a4 Lossless!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.