Database Normalisation Flashcards
What is functional dependency?
Where A -> B would mean that there is no ambiguity of the value of B if A is given
What is full functional dependency?
A -> B is full when B doesn’t depend on any proper subset of A
How do you read dependency diagrams?
Arrows point from attributes to the attributes that are dependant on them
What is 1st Normal Form? (1NF)
Each row contains only one value for each column, multi-valued attributes are in separate tables
What is 2nd Normal Form? (2NF)
Relation in 1NF where every attribute is fully functionally dependent on the primary key
What is transitive dependency?
If A -> B and B -> C C is transitively dependent on A via B
What is 3rd Normal Form? (3NF)
Relation in 2NF where no attributes are transitively dependent on the primary key
How do you make a schema into 2NF from 1NF?
Decompose schema along functional dependency on partial keys, with the partial key being a primary key of the new schema
How do you make a schema into 3NF from 2NF?
Decompose along transitive dependency, with middle attributes as primary keys of new schemas