12. Normalization
Unnormalization
form
1st normalization
form
2nd normalization
form
3rd normalization
form
4th normalization
form
5th normalization
form
Remove
repeating
group
Remove partial
dependencies
Remove
transitive
dependencies
Remove remaining
anomalies from
functional
dependencies
Remove multi-value
dependencies
join
dependencies
15. 1st Normalized Form problem
Data Redundancy
Might cause inconsistency problem
16. Move to 2nd Normalized Form
Conditions
It’s already in 1st normalized form
All attributes have fully functional dependency with primary key, NOT partial dependency
Get rid of Partial dependencies
18. 2nd Normalized Form
Separate into relation tables...
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation Table
19. Move to 3rd Normalized Form
Conditions
It’s already in 2nd normalized form
Get rid of Transitive Dependency
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation Table
20. Move to 3rd Normalized Form
Transitive Dependency
Other attributes, those are not a primary key, cannot define the value of other
attributes
PK
Student Relation
Non-PK
21. 3rd Normalized Form
Separate into relation tables...
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK
Position Relation
22. 3rd Normalized Form
Separate into relation tables...
PK
Student Relation
FK FK
Student-Course Relation
FK
PK
Position Relation
PK Course Relation FK PK Lecturer Relation
23. Move to 4th Normalized Form
Conditions
It’s in 3rd normalized form
Get rid of multi-valued dependencies
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation
24. Move to 4th Normalized Form
Conditions
It’s in 3rd normalized form
Get rid of multi-valued dependencies
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation
Add Research for each lecturer
25. Move to 4th Normalized Form
Multi-valued Dependencies
AB; Lecturer_IDLecturer
AC; Lecturer_IDResearch
But B and C is independent
A B C
PK
PK
Lecturer Relation
Lecturer-Research Relation
26. Final Form – 4th Normalized Form
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation PK Lecturer-Research Relation
27. 5th Normalized Form
Separate more relation and it’s able to join back without spurious tuple occurance
No spurious tuple
PK Position Relation
PK Position Relation
29. PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation PK Lecturer-Research Relation
OLD
version
NEW version
30. Conclusion
The purpose of normalization is to
Reduce data redundacy
Prevent data inconsistency
Trade-off
Performance
The factors to be considered while normalization
Single-valued vs Multivalued
Dependencies
Partial dependency
Transitive dependency
Functional dependency
Multivalued dependency
Key and non-Key field relationship