Function Dependencies & Normalization Flashcards
Types of update anomalies
Insertion, Deletion, Modification
Functional Dependencies
Given X->Y, the attributes X will determine the attributes Y uniquely.
Y is functionally dependent on X
X functionally determines Y
Full functional dependencies
Given X->Y, there can be no attributes taken out of X such that X can still determine Y
1NF
All domain values in R are atomic.
In other words, no nested values, lists of attributes etc.
2NF
R is in 1NF AND every non-key attribute if fully dependent on the primary key.
In other words, each non-candidate key needs to be only identified by the entire primary key, not just part of it.
3NF
R is in 2NF AND every non-key attribute is non-transitively dependent on the primary key.
In other words, there are not any attributes that depend on the status of other non-prime attributes
BCNF
Boyce-Codd Normal Form:
Every functional dependency of the relation, R, is determined by primary key(s) only.
Superkey
Attributes that uniquely identity a tuple
Key
A minimal superkey
Candidate Key
A key that could uniquely identity a relation
Alternate key
A secondary key that could have been the primary key
Foreign key
A key that maps to another entity
Natural Key
Keys that exist in the real world, ssn,
Composite key
Keys with two or more attributes
Surrogate Key
Key with no real world meaning, opposite of a natural key