Professional Documents
Culture Documents
4NF and Multivalued Dependency by Kristina Miguel
4NF and Multivalued Dependency by Kristina Miguel
DEPENDENCY
By Kristina Miguel
Review
Review (cont.)
1NF
2NF
BCNF
3NF
Make a separate table for each set of related attributes, and give each table a primary
key.
If there are non-trivial dependencies between candidate key attributes, separate them
out into distinct tables.
Multivalued Dependency
(MVD)
A MVD XY,
MVD (cont.)
MVD (cont.)
Representation of XY
equal
exchange
others
MVD Example
Drinkers(name, addr, phones, beersLiked)
A drinkers phones are independent of
the beers they like.
If we have tuples:
name
sue a
sue a
sue a
sue a
4NF
Definition
1.
2.
4NF Decomposition
Example
Drinkers(name, addr, phones, beersLiked)
FD:
nameaddr
MVDs: namephones
namebeersLiked
Key is {name, phones, beersLiked}.
All dependencies violate 4NF.
4NF Decomposition
Example (cont.)
Decompose using nameaddr:
Drinkers1(name, addr)
1.
2.
4NF Decomposition
Example (cont.)
Decompose Drinkers2
Either MVD name ->-> phones or name ->> beersLiked tells us to decompose to:
Drinkers3(name,
phones)
Drinkers4(name, beersLiked)
Summary
A multivalued dependency is a
statement that two sets of attributes in a
relation have sets of values that appear
in all possible combinations.
If a relation is in 4NF, then every
nontrivial MVD is really an FD with a
superkey on the left.
References
http://www.datamodel.org/Normalization
Rules.html
http://www.almaden.ibm.com/cs/people/f
agin/tods77.pdf
http://www.bkent.net/Doc/simple5.htm
http://infolab.stanford.edu/~ullman/dscb.
html