Wednesday, February 23, 2011
Normalisation @ 4:32 PM
~Normalisation~
Advantages of Normalisation
- Takes up less space as it removes data redundancy
- Allows for faster querying due to less data being processed
First Normal Form (1NF)
- Each filed stores data items
- If data items can be separated, then separate them
- No multiple data items within individual fields and no fields are repeated
Second Normal Form (2NF)
- All tables must comply with 1NF (nothing is repeated)
- Non-key attributes (not unique) are functionally dependent on the primary key (e.g. stud ID 001 is smith but stud ID 002 is also smith but a DIFFERENT smith)
- The primary key defines only ONE non-key attribute although doesn't have to be unique
- Example: date of birth, address, etc are all functionally dependent on the student ID
Third Normal Form (3NF)
- All tables must comply with 1NF and 2NF
- Every non-key attribute is functionally dependent only on the set table's primary key