12. Databases Flashcards
1
Q
Normalisation
A
Every attribute is dependent on upon the key; the whole key and nothing but the key.
Why: Eliminate data inconsistencies; minimise data duplication.
If Db is relational it must be normalised.
2
Q
1NF
A
Removal of any repeating attributes or groups of attributes.
We do this by adding a primary key and making a new table with relations based on the primary key.
3
Q
2NF
A
Must be in 1NF first.
Every attribute must be dependent on the whole key and not just part of it. (Composite keys)
Otherwise attributes will repeat.
4
Q
3NF
A
Must be in 2NF first.
Every attribute is dependent on the key; the whole key and nothing but the key.
5
Q
Tips for normalising
A
- If you are unsure, check for any obvious duplication.
- You can often get to 3NF through common sense and use of entity modelling.
- Many to many relationships must have a link table in between