Normalization is the process of organizing data in a database so that:
- Data is stored efficiently (no repetition).
- Data is consistent (no errors or conflicts).
- Easy to update, insert, or delete data without issues.
Think of it like arranging your room:
- Don’t keep the same book in 5 places (redundancy).
- Keep things in proper boxes (tables) so you can find them easily.
Why Do We Normalize?
- To remove duplicate data
- To avoid data anomalies (like mistakes when updating or deleting)
- To make database maintenance easy
Types of Normalization (Normal Forms)
Normalization is done in steps called Normal Forms (NF).

First Normal Form (1NF)
- Each column should have atomic (single) values.
- No repeating groups or arrays in a column.
Example:
Bad table:
student_id | name | subjects |
---|---|---|
1 | Ramesh | Maths, Science |
2 | Priya | Arts, Maths |
1NF Table:
student_id | name | subject |
---|---|---|
1 | Ramesh | Maths |
1 | Ramesh | Science |
2 | Priya | Arts |
2 | Priya | Maths |
- Each column has only one value now.
Second Normal Form (2NF)
- Already in 1NF.
- Every column must depend fully on the primary key (no partial dependency).
Example:
student_id | subject | teacher_name |
---|
- If
teacher_name
depends only onsubject
, notstudent_id
, it’s partial dependency → violates 2NF.
Fix (2NF):
- Table 1: Student-Subjects
| student_id | subject |
|————|———|
| 1 | Maths | - Table 2: Subject-Teacher
| subject | teacher_name |
|———|————–|
| Maths | Mr. Sharma |
Third Normal Form (3NF)
- Already in 2NF.
- No transitive dependency: Non-primary key columns should not depend on other non-primary columns.
Example:
student_id | dept_id | dept_name |
---|
dept_name
depends ondept_id
, notstudent_id
→ violates 3NF.
Fix (3NF):
- Table 1: Students
| student_id | dept_id |
|————|——–| - Table 2: Departments
| dept_id | dept_name |
|———|———–|
Quick Summary Table
Normal Form | Rule | Example Fix |
---|---|---|
1NF | Each column has atomic value | Split multiple subjects into rows |
2NF | No partial dependency on part of primary key | Move teacher info to separate table |
3NF | No transitive dependency | Move department name to another table |
Real-Life Analogy
- 1NF → Keep one book per shelf slot, no stacking.
- 2NF → Don’t write teacher’s name on each student’s book, keep a separate teacher list.
- 3NF → Don’t write department name in every student’s record, keep a separate department table.
Super Simple Memory Trick
Normalization = Organizing your database neatly
- 1NF → One value per column
- 2NF → Every column depends fully on primary key
- 3NF → No column depends on another non-key column