---Advertisement---

DBMS Normalization: 1NF, 2NF, 3NF with Database Examples

By Manisha

Updated On:

---Advertisement---
DBMS Normalization

👉What is Database Normalization?

DBMS Normalization: Database Normalization is a data structuring process in DBMS that minimizes redundancy and eliminates anomalies (insertion, update, and deletion anomalies). This is done by breaking large tables into smaller, related tables while maintaining data integrity.

🔹 Key Benefits of Normalization:
Reduces Data Redundancy – Prevents duplicate data storage.
Eliminates Anomalies – Ensures smooth insertion, deletion, and updates.
Improves Data Integrity – Maintains consistency and accuracy.
Optimizes Query Performance – Helps in faster data retrieval.

DBMS Normalization: The concept of normalization was introduced by Dr. Edgar F. Codd, the father of the Relational Database Model. He developed the First Normal Form (1NF) and later extended it to Second (2NF) and Third Normal Forms (3NF). Along with Raymond F. Boyce, he also introduced the Boyce-Codd Normal Form (BCNF).


👉Types of Normal Forms in DBMS

DBMS Normalization: Below are the different Normal Forms (NF) used in SQL databases:

Each column contains atomic values (no multiple values in a single field).
Each row is unique (has a unique identifier).
No repeating groups of data.

👉Example:
Before applying 1NF, assume we have the following unstructured table:

Student_IDStudent_NameSubjects_Enrolled
101John DoeMath, Science
102Jane SmithEnglish, History

Issue: Subjects_Enrolled contains multiple values, violating atomicity.

Student_IDStudent_NameSubject
101John DoeMath
101John DoeScience
102Jane SmithEnglish
102Jane SmithHistory

Now, each column contains atomic values, making it 1NF-compliant.


The database must be in 1NF.
Partial dependencies must be removed (all non-key attributes should depend on the entire primary key).

👉Example: Consider a table with a composite primary key (Student_ID, Course_ID):

Student_IDCourse_IDStudent_NameCourse_Name
101C01John DoeMath
102C02Jane SmithScience

Issue: Student_Name depends only on Student_ID, not on the full (Student_ID, Course_ID) key.

🔹 Student Table

Student_IDStudent_Name
101John Doe
102Jane Smith

🔹 Course Table

Course_IDCourse_Name
C01Math
C02Science

🔹 Student_Course Mapping Table

Student_IDCourse_ID
101C01
102C02

Now, each non-key attribute fully depends on the primary key, making the table 2NF-compliant.


The database must be in 2NF.
Transitive dependencies must be removed (non-key attributes should not depend on other non-key attributes).

👉 Example:

Employee_IDEmployee_NameDepartment_IDDepartment_Name
201AliceD01HR
202BobD02IT

Issue: Department_Name depends on Department_ID, which is not a primary key in this table.

🔹 Employee Table

Employee_IDEmployee_NameDepartment_ID
201AliceD01
202BobD02

🔹 Department Table

Department_IDDepartment_Name
D01HR
D02IT

Now, there are no transitive dependencies, making it 3NF-compliant.


The database must be in 3NF.
Every determinant must be a candidate key (i.e., no anomalies should exist).

BCNF is a stricter version of 3NF, used when multiple candidate keys exist.


The database must be in BCNF.
Eliminates multi-valued dependencies (i.e., multiple independent facts in a single table).

Example: A movie database where a director may direct multiple movies, and each movie may have multiple actors.


The database must be in 4NF.
Deals with complex relationships and joins between multiple tables.
Ensures that data is stored without redundancy while allowing reconstruction through joins.


👉Keys in SQL Normalization

A Primary Key is a unique identifier for each record in a table.

Cannot be NULL.
Must be unique.
Should remain constant.

A Composite Key is a primary key made up of multiple columns to uniquely identify a record.

  Example: In a Student_Course table, (Student_ID, Course_ID) together form a Composite Key.


👉Conclusion: Why is Normalization Important?

DBMS Normalization: Prevents Data Redundancy – No duplicate data.
Eliminates Update & Deletion Anomalies – Ensures smooth database operations.
Ensures Data Integrity – Data remains accurate and consistent.
Optimizes Query Performance – Faster retrieval and indexing.

  Best Practice: In most real-world scenarios, 3NF is sufficient for database normalization. However, BCNF and higher forms are used for complex data relationships.


  Need Help with Database Design & Optimization? Let me know your questions! Meta Description: Learn DBMS Normalization with detailed explanations of 1NF, 2NF, 3NF, BCNF, and higher normal forms. Understand how data redundancy is eliminated using real-world database examples.

DATABASE DESIGN

Download My SQL

Leave a Comment

Index