What is Database Normalization?
Updated Apr 28, 2026
Short answer
Database normalization is the process of organizing data in a database to reduce duplication and improve data consistency. It involves dividing large tables into smaller related tables and defining relationships between them using keys. The goal is to make data easier to maintain while preventing problems such as inconsistent updates and duplicate information.
Deep explanation
Database normalization is a database design technique used in relational databases to structure data efficiently. It follows a set of rules called normal forms that help organize information into logical tables.
The main goals of normalization are:
- Reduce duplicate data.
- Improve data integrity.
- Prevent update, insert, and delete anomalies.
- Make relationships between data clearer.
Instead of storing all information in one large table, normalization separates related data into multiple tables and connects them using keys.
---
Problems Without Normalization
Consider an unnormalized customer order table:
| OrderId | CustomerName | CustomerEmail | ProductName | ProductPrice |
|---|---|---|---|---|
| 101 | Alice | alice@example.com | Laptop | 1000 |
| 102 | Alice | alice@example.com | Mouse | 50 |
| 103 | Bob | bob@example.com | Keyboard | 80 |
This design has problems:
Data Duplication
Alice's information is repeated for every order.
If Alice changes her email address, multiple rows must be updated.
---
Update Anomaly
Suppose Alice changes her email:
Before:
Order 101 → alice@example.comOrder 102 → alice@example.com
After:
Order 101 → alice.new@example.comOrder 102 → alice@example.comThe database now contains inconsistent information.
---
Insert Anomaly
Suppose a new customer registers but has not placed an order yet.
In this design, there is no place to store the customer information without creating an empty order.
---
Delete Anomaly
Suppose Bob's only order is deleted.
The customer's information may also disappear because it was stored together with the order.
---
Normalized Design
Normalization separates the data into related tables.
Customers Table
| CustomerId | Name | |
|---|---|---|
| 1 | Alice | alice@example.com |
| 2 | Bob | bob@example.com |
---
Products Table
| ProductId | Name | Price |
|---|---|---|
| 1 | Laptop | 1000 |
| 2 | Mouse | 50 |
---
Orders Table
| OrderId | CustomerId | ProductId |
|---|---|---|
| 101 | 1 | 1 |
| 102 | 1 | 2 |
| 103 | 2 | 2 |
Now:
- Customer information is stored once.
- Product information is stored once.
- Orders reference customers and products using keys.
---
Normal Forms
Normalization is commonly explained through normal forms. Each level introduces additional rules.
---
First Normal Form (1NF)
A table is in First Normal Form when:
- Each column contains atomic values.
- Each row is unique.
- There are no repeating groups of data.
Bad design:
| StudentId | Name | Courses |
|---|---|---|
| 1 | Alice | SQL, C#, Java |
The Courses column contains multiple values.
Better:
Students:
| StudentId | Name |
|---|---|
| 1 | Alice |
Courses:
| StudentId | Course |
|---|---|
| 1 | SQL |
| 1 | C# |
| 1 | Java |
---
Second Normal Form (2NF)
A table is in Second Normal Form when:
- It is already in 1NF.
- All non-key columns depend on the entire primary key.
This mainly applies when a table has a composite primary key.
Example:
| OrderId | ProductId | ProductName |
|---|---|---|
| 101 | 1 | Laptop |
| 101 | 2 | Mouse |
The ProductName depends only on ProductId, not the entire key (OrderId, ProductId).
A better design separates products:
Products:
| ProductId | ProductName |
|---|---|
| 1 | Laptop |
| 2 | Mouse |
Orders:
| OrderId | ProductId |
|---|---|
| 101 | 1 |
| 101 | 2 |
---
Third Normal Form (3NF)
A table is in Third Normal Form when:
- It is already in 2NF.
- Non-key columns depend only on the primary key.
- There are no transitive dependencies.
Example:
Employees table:
| EmployeeId | EmployeeName | DepartmentId | DepartmentName |
|---|
DepartmentName depends on DepartmentId, not directly on EmployeeId.
Better design:
Employees:
| EmployeeId | EmployeeName | DepartmentId |
|---|
Departments:
| DepartmentId | DepartmentName |
|---|
---
Benefits of Normalization
Improved Data Consistency
Because information is stored in one place, updates are easier and more reliable.
Example:
Changing a customer's email requires updating one row instead of many.
---
Reduced Storage Usage
Duplicate information is removed.
Instead of storing:
Alicealice@example.comhundreds of times, it is stored once.
---
Better Data Integrity
Relationships between tables ensure data remains valid.
Example:
A foreign key prevents an order from referencing a customer that does not exist.
---
Trade-offs of Normalization
While normalization improves data organization, it can introduce some complexity.
More Tables
A normalized database usually has more tables.
Example:
Instead of:
Orders Table-------------OrderIdCustomerNameCustomerEmailProductNameProductPriceYou may have:
CustomersProductsOrdersOrderItems---
More Joins
Because data is distributed across tables, retrieving information often requires joins.
Example:
SELECT Customers.Name, Orders.OrderIdFROM CustomersJOIN OrdersON Customers.CustomerId = Orders.CustomerId;---
Normalization vs Denormalization
Normalization is not always the best choice.
In some systems, performance is improved by intentionally duplicating data. This is called denormalization.
Examples:
- Reporting databases.
- Data warehouses.
- Systems requiring very fast reads.
A typical transactional system may prefer normalization, while an analytics system may use denormalized structures.
Real-world example
A banking application stores customer accounts and transactions.
A poorly designed table:
| AccountId | CustomerName | CustomerAddress | TransactionId | Amount |
|---|---|---|---|---|
| 1 | Alice | New York | 100 | 500 |
| 1 | Alice | New York | 101 | 300 |
The customer's address is duplicated for every transaction.
A normalized design:
Customers:
CREATE TABLE Customers ( CustomerId INT PRIMARY KEY, Name VARCHAR(100), Address VARCHAR(200));Accounts:
CREATE TABLE Accounts ( AccountId INT PRIMARY KEY, CustomerId INT, FOREIGN KEY(CustomerId) REFERENCES Customers(CustomerId));Transactions:
CREATE TABLE Transactions ( TransactionId INT PRIMARY KEY, AccountId INT, Amount DECIMAL(10,2), FOREIGN KEY(AccountId) REFERENCES Accounts(AccountId));Now:
- Customer information exists once.
- Multiple accounts can belong to a customer.
- Each account can have many transactions.
- Data remains consistent.
Common mistakes
- * Thinking normalization means removing all duplicate data in every situation.
- * Over-normalizing a database and creating unnecessary complexity.
- * Ignoring application performance requirements when designing tables.
- * Forgetting that normalized designs often require more joins.
- * Storing multiple values in a single column.
- * Mixing unrelated entities into the same table.
- * Not defining proper Primary Keys and Foreign Keys.
- * Assuming normalization is always better than denormalization.
Follow-up questions
- What are the main goals of database normalization?
- What is the difference between normalization and denormalization?
- What is the difference between 2NF and 3NF?
- Why do normalized databases require more joins?
- What are update, insert, and delete anomalies?
- Is a fully normalized database always the best design?