Chapter 7: Normalization Flashcards
(44 cards)
What does decomposition do?
reduce repetition
lossy decomposition
loss of information
lossless Decomposition
includes all attributes of R
Functional Dependencies
generalization of the notion of a key
legal instance
relation satisfies all real world constraints
B can hold A but…
sometimes A cannot hold B
trivial
A gives B and B is a subset of A
Trivial Examples:
ID, NAME gives ID
name gives name
Closure
when all functional dependencies can be implied
SuperKey
sufficient to identify a unique tuple
Candidate Key
it is minimal, meaning just one key alone
satisfies
relation r is legal under set F functional dependency
holds on
all legal relations on R satisfies F functional dependency
Visual of lossless Decomposition
R1 and R2 gives R1
R2 and R1 gives R2
First Normal Form
Domain is atomic
Atomic
indivisible units
ex: names, or ID numbers
non-atomic numbers can..
- complicate storage
- cause redundancy
When decomposing a relation, to do testing for dependency preservation you cannot use …
Cartesian product or joins
Boyce - Codd Normal Form
at least One of the following holds true…
a to beta is trivial
a is a superkey of R
Decomposing into BCNF
R1 = a or B
R2 = R - (B - a)
Not always possible to achieve both BCNF and…
Dependency Preservation
Third Normal Form is only if…
- a gives B is trivial
- a is a superkey for R
- attributes in B-a is in the candidate key
Advantages of 3NF versus BCNF
3NF always has dependency preservation
Disadvantages of 3NF
can have null values
redundancy