functional dependencies and normal form Flashcards
what is a functional dependency
when x implies y, if x agrees then so does y making it redundant as they’re both essentially the same
decomposition
removing dependencies and anomalies then putting them in their own table
deletion anomaly
when deleting a record causes something that you didnt mean to to be deleted
insertion/modification anomaly
cannot insert new data due to other required data missing
what is f+ closure (Armstrong’s axioms) used for
to analyse functional dependencies and reveal hidden dependencies
what are the 5 armstrongs axioms
reflexivity
augmentation
transitivity
union
decomposition
reflexivity
if x ∈ y then y -> x
augmentation
if x -> y then yz -> z for any z
transitivity
if x -> y and y -> z then x -> z
union
if x -> y and x-> z then x -> yz
decomposition
if x -> yz then x -> y and x-> z
what is first normal form
only atomic values
how do we get to first normal form
flatten multivalued attributes into atomic ones
extend the primary key so it contains the new atomic attribute; making a composite key
what is second normal form
1nf and every non prime attribute should be fully functionally dependent on the entire primary key
how do we get to second normal form
of there is a partial dependency you need to make a new table