Skip to content

Normalization in DBMS

Introduction to Normalization

Normalization is a database design technique used to reduce redundancy and eliminate anomalies in relational databases. It involves organizing data into multiple related tables to improve data integrity, consistency, and efficiency.

Why is Normalization Important?

Without normalization, databases suffer from:
Redundancy – Repetitive data consumes extra storage.
Insertion Anomalies – Unable to insert data without redundant details.
Update Anomalies – Modifying one record requires updating multiple rows.
Deletion Anomalies – Deleting one record may remove important information.

Example of a Poorly Designed Table (Unnormalized Form – UNF)

StudentIDNameCourseInstructorInstructorPhoneHobby
101AliceMathProf. X9998887777Reading
101AliceScienceProf. Y8887776666Chess
102BobEnglishProf. Z7776665555Reading

💡 Issues in this table:

  • Repeated data (Student Name, Instructor, InstructorPhone).
  • Multiple values in a single column (Hobby).
  • Difficult to update or delete without affecting other data.

First Normal Form (1NF) – Eliminating Repeating Groups

A table is in 1NF if:
✅ Each column contains atomic (indivisible) values.
✅ Each row has a unique identifier (Primary Key).

Applying 1NF

StudentIDNameCourseInstructorInstructorPhoneHobby
101AliceMathProf. X9998887777Reading
101AliceMathProf. X9998887777Chess
101AliceScienceProf. Y8887776666Reading
102BobEnglishProf. Z7776665555Reading

Solution:

  • Hobby values are split into separate rows.
  • Each column contains atomic values.

Second Normal Form (2NF) – Removing Partial Dependency

A table is in 2NF if:
✅ It is in 1NF.
Every non-key attribute depends on the entire primary key.

💡 Problem in 1NF Table:

  • InstructorPhone depends only on Instructor, not on StudentID + Course.
  • Solution: Split into separate tables.

Applying 2NF

Student Table

StudentIDName
101Alice
102Bob

Course Table

CourseInstructor
MathProf. X
ScienceProf. Y
EnglishProf. Z

Instructor Table

InstructorInstructorPhone
Prof. X9998887777
Prof. Y8887776666
Prof. Z7776665555

Student_Course Table (Mapping Table)

StudentIDCourse
101Math
101Science
102English

Solution:

  • Instructor details are moved to a separate table.
  • No partial dependencies exist.

Third Normal Form (3NF) – Removing Transitive Dependency

A table is in 3NF if:
✅ It is in 2NF.
No transitive dependencies (A → B and B → C, then A → C must not exist).

💡 Problem in 2NF Table:

  • InstructorPhone depends on Instructor, which depends on Course.

Applying 3NF

  • Move InstructorPhone to a separate table.

Instructor Table (After 3NF)

InstructorInstructorPhone
Prof. X9998887777
Prof. Y8887776666
Prof. Z7776665555

Solution:

  • Transitive dependency removed.
  • All non-key attributes now depend directly on the primary key.

Boyce-Codd Normal Form (BCNF) – Stronger than 3NF

A table is in BCNF if:
✅ It is in 3NF.
Every determinant is a candidate key.

💡 When to Apply BCNF?
If a table has multiple candidate keys with dependencies.

Example Before BCNF

TeacherIDCourseClassroom
T101MathRoom 101
T102ScienceRoom 102
T101PhysicsRoom 101
  • Issue:
    • Course → Classroom, but TeacherID → Classroom is also valid.
    • Not every determinant is a candidate key.

Solution:

  • Break the table into separate tables to remove conflicting dependencies.

Fourth Normal Form (4NF) – Removing Multi-Valued Dependencies

A table is in 4NF if:
✅ It is in BCNF.
✅ It has no multi-valued dependencies (MVDs).

💡 Example Before 4NF

StudentIDCourseHobby
101MathReading
101MathChess
  • Issue:
    • StudentID →→ Hobby and StudentID →→ Course are independent.

Solution:
Separate Multi-Valued Data into Two Tables.

Student_Course Table

StudentIDCourse
101Math

Student_Hobby Table

StudentIDHobby
101Reading
101Chess

Fifth Normal Form (5NF) – Eliminating Join Dependencies

A table is in 5NF if:
✅ It is in 4NF.
No join dependency exists (tables can be recombined without losing information).

💡 Used for complex relationships where multiple many-to-many dependencies exist.


Domain-Key Normal Form (DKNF) – The Ultimate Normal Form

A table is in DKNF if:
Every constraint is defined as a key constraint or domain constraint.
No additional constraints exist at the application level.

💡 Achieving DKNF is difficult in practice.


Final Thoughts

  • Normalization eliminates redundancy and improves data integrity.
  • 1NF ensures atomicity, 2NF removes partial dependencies, 3NF removes transitive dependencies.
  • BCNF, 4NF, 5NF, and DKNF further refine the structure for complex databases.