Normalization
Normalization
Show a count of all expensive procedures (>1500) covered by Manulife of Blue Cross
performed by all DDS certified
dentists. Breakdown the results to show a count and total value for each dentist
patient pairing.
Result should show dentist info and patient info.
|| = concatination
NORMALIZATION
Consider a cargo ship that has storage rooms for storage containers. Storage
containers are large
moveable containers that store individual packages to be shipped.
Package in a container in a room
FUNCTIONAL DEPENDENCY
Is a constraint about two or more columns of a table: X determines Y (X #-> Y) if
there exists at
most one value of Y for every value of X.
Suppose we have two columns A and B
We say A "determines" B (A -> B)
Normal Forms:
a way to describe a way in which a database has been fixed.
Different levels of normal form: First, second, third, BCNF (Boyce-Codd Normal
form)
Typically want third of BCNF
NORMALIZATION:
decomposing a large table into smaller tables
Ex. T(a,b,c,d,e,f)
1. c,d -> f
2. d -> a
3. d -> b
4. a,b -> e
5. d -> e
6. c,d -> a,b,e
Candidate key: (c,d)
c,d -> a,b,e,f
d -> a,b,e (all three (a,b,e) are partial dependencies, because the determinant (d)
is part of the candidate key (c,d))
a,b -> e
Excersize:
T(a,b,c,d)
a -> c (not partial because a and c are both key attributes)
b,c -> d
c -> a (not partial same as a -> c)
a,b -> d