Introduction to Database Normalization
Database normalization is the process of organizing data in a relational database to reduce redundancy and improve data integrity. The primary goal of normalization is to ensure that data is stored efficiently while maintaining its consistency across the database. It involves dividing large, unnormalized tables into smaller, more manageable tables and defining relationships between them.
In this article, we’ll walk through the process of database normalization, converting an unnormalized database to 3rd Normal Form (3NF), and discuss the pros and cons of normalization.
What is Database Normalization?
Normalization is the process of removing redundancy and undesirable characteristics like:
Data redundancy (storing the same data in multiple places),
Insertion anomalies (difficulty in inserting data due to redundant information),
Update anomalies (inconsistent data due to redundant updates),
Deletion anomalies (inconsistent data after deleting a record).
The process involves several stages, or "normal forms," with each subsequent form building on the previous one:
1NF (First Normal Form): Ensures that each column contains only atomic (indivisible) values, and each record is unique.
2NF (Second Normal Form): Achieved when a table is in 1NF and all non-key attributes are fully functionally dependent on the primary key.
3NF (Third Normal Form): Achieved when a table is in 2NF and all attributes are functionally dependent only on the primary key (eliminating transitive dependencies).
Converting an Unnormalized Database to 3NF: Practical Example
Let’s start by considering an unnormalized database and walk through the normalization steps up to 3NF.
Step 1: Unnormalized Table
Imagine we have an unnormalized table storing information about students, their courses, and professors.
| Student_ID | Student_Name | Course_Name | Professor_Name | Professor_Phone | Professor_Email |
|---|---|---|---|---|---|
| 1 | John Doe | Math 101 | Dr. Smith | 123-456-7890 | [email protected] |
| 2 | Jane Smith | History 101 | Dr. Johnson | 234-567-8901 | [email protected] |
| 1 | John Doe | Science 101 | Dr. Clark | 345-678-9012 | [email protected] |
| 3 | Alice Brown | Math 101 | Dr. Smith | 123-456-7890 | [email protected] |
This table contains several issues:
Redundant Data: The professor’s details (name, phone number, email) are repeated for each student enrolled in the course.
Inconsistent Data: If Professor Smith changes their phone number or email, we'd have to update multiple rows.
Step 2: First Normal Form (1NF)
To bring this table into 1NF, we ensure that each field contains only atomic (indivisible) values. In our case, the data is already atomic, so we don't need to make any changes. However, we must ensure that there are no repeating groups.
The table is already in 1NF since each cell contains only a single value, but we need to eliminate redundancy by separating repeating groups.
| Student_ID | Student_Name | Course_Name | Professor_Name | Professor_Phone | Professor_Email |
|---|---|---|---|---|---|
| 1 | John Doe | Math 101 | Dr. Smith | 123-456-7890 | [email protected] |
| 2 | Jane Smith | History 101 | Dr. Johnson | 234-567-8901 | [email protected] |
| 1 | John Doe | Science 101 | Dr. Clark | 345-678-9012 | [email protected] |
| 3 | Alice Brown | Math 101 | Dr. Smith | 123-456-7890 | [email protected] |
Step 3: Second Normal Form (2NF)
To achieve 2NF, we need to ensure that:
The table is in 1NF.
All non-key attributes are fully functionally dependent on the primary key.
The current table violates 2NF because the non-key attributes Professor_Name, Professor_Phone, and Professor_Email depend on the course, not the combination of Student_ID and Course_Name (the composite primary key).
We need to split this into two tables:

Join the conversation! Your thoughts help the community grow.