Why must all databases be fully normalised?
- No duplication of data leads to…
- Easier to update and change data, as changes will only need to occur in one field.
- Maintaining data integrity, and removes the possibility of one record having two different values for attributes.
- Having smaller tables with fewer fields...
- Means faster queries.
- Means more data can fit inside the same amount of space
What causes non-atomic fields?
Many-to-Many relationships.
How to resolve non-atomic fields?
Split an entity into two relations.
What causes repeating groups of attributes?
Many-to-many relationships.
How to resolve repeating sets of attributes?
Introduce link tables.
Describe a link table?
A relation with all of the attributes being both foreign keys of other relations and composite primary keys of itself.
What is a partial key dependency?
Where an entity has a composite primary key and another attribute is dependent on only one of the attributes that make up the primary key.
What is a non-key dependency?
Where an attribute is not dependant on the primary key.
What is 1st normal form (1NF)?
- No-non atomic fields.
- No repeating sets of data.
What is 2nd normal form (2NF)?
- No-non atomic fields.
- No repeating sets of data.
- No partial key dependencies.
What is 3rd normal form?
- No-non atomic fields.
- No repeating sets of data.
- No partial key dependencies.
- No non-key dependencies.