Schema Refinement and Normal Forms: Also Used
Schema Refinement and Normal Forms: Also Used
Normal Forms
Chapter 19
Also used:
www.cs.rpi.edu/~zaki/cs4380/Spring02/lectures/lecture10.ppt
http://www.bkent.net/Doc/simple5.htm
wikipedia
Key Y A
•Candidate keys are: {Tutor ID, Student ID} and {Tutor SSN, Student ID}
The dependency of Tutor ID on Tutor Social Security Number breaks the BCNF
since Tutor SSN is not a candidate key.
A B B C
A B C 1 2 2 3
1 2 3 4 5 5 6
4 5 6 7 2 2 8
7 2 8
A B C
Joining AB and BC produces tuples that did not 1 2 3
Originally exist in ABC
4 5 6
Under what circumstances a decomposition
7 2 8
is lossless ? 1 2 8
7 2 3
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 1
When is a Join Lossless? A B
1 2
A B C 4 5
The decomposition of R into 7 2
1 2 3
X and Y is lossless-join wrt F 4 5 6
if and only if the closure of F 7 2 8 B C
contains: 2 3
X Y X, or 5 6
X Y Y 2 8
A B C
In particular, the 1 2 3
decomposition of R into 4 5 6
UV and R - V is lossless-join 7 2 8
if U V holds over R. 1 2 8
7 2 3
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 2
Dependency Preserving Decomposition