Normalization keeps every fact in a single home. A customer's city is stored once, in customers, and every other table points to it by key. That prevents update anomalies, where a change lands in one place but not another. Denormalization deliberately copies data to make reads faster, and takes on the job of keeping the copies in sync. Most schema decisions sit somewhere between the two, so it helps to know both well.
Side by side#
The difference is easiest to see with one small shop stored both ways.
Normalized: customers and orders in separate tables, linked by customer_id.
| id | name | city |
|---|---|---|
| 31 | Maya | Lisbon |
| 32 | Tomás | Porto |
| id | customer_id (FK) | total | placed_at |
|---|---|---|---|
| 9001 | 31 | 42.50 | 2025-03-14 09:12 |
| 9002 | 31 | 18.00 | 2025-03-20 17:40 |
Denormalized: the customer's name and city copied onto every order.
| id | customer_id | name | city | total | placed_at |
|---|---|---|---|---|---|
| 9001 | 31 | Maya | Lisbon | 42.50 | 2025-03-14 09:12 |
| 9002 | 31 | Maya | Lisbon | 18.00 | 2025-03-20 17:40 |
The denormalized table can show an order list without a join. But when Maya moves to Berlin, every order she has ever placed must be updated. Miss one and the data disagrees with itself.
The normal forms#
So how do you know a schema is normalized? You check it in steps called normal forms. Each form fixes one kind of duplication, and each builds on the one before. In practice, "normalized" usually means third normal form (3NF).
First normal form (1NF): one value per cell#
A table is in 1NF when every cell holds a single, atomic value and there are no repeating groups of columns.
This customers table breaks 1NF in two ways: a list in one cell, and numbered columns for the same thing.
| customer_id | name | phones | phone1 | phone2 |
|---|---|---|---|---|
| 1 | Alice | 555-0100, 555-0101 | 555-0100 | 555-0101 |
The fix is a separate table with one row per phone number:
| customer_id | phone |
|---|---|
| 1 | 555-0100 |
| 1 | 555-0101 |
Now you can index, search and add phone numbers without changing the schema.
Second normal form (2NF): depend on the whole key#
A table is in 2NF when it is in 1NF and every non-key column depends on the whole primary key. This only matters when the key has more than one column.
Here the key is (student_id, course_id), one row per student per course:
| student_id | course_id | student_name | grade |
|---|---|---|---|
| 7 | CS101 | Priya | A |
| 7 | CS202 | Priya | B |
grade depends on both the student and the course. But student_name depends only on student_id, which is part of the key. So the name repeats for every course Priya takes. The fix moves it to a students table (student_id, student_name) and leaves enrollments with (student_id, course_id, grade).
Third normal form (3NF): no facts about other facts#
A table is in 3NF when it is in 2NF and no non-key column depends on another non-key column. That chain is called a transitive dependency.
Here the key is employee_id, one row per employee:
| employee_id | name | department_id | department_name | manager |
|---|---|---|---|---|
| 101 | Sam | 10 | Payments | Lee |
| 102 | Ana | 10 | Payments | Lee |
department_name and manager depend on department_id, not on the employee. If Payments gets a new manager, you must update every employee row. The fix splits the table:
employees(employee_id,name,department_id)departments(department_id,department_name,manager)
Here are the three forms in one place:
| Form | Rule | Breaks it | Fix |
|---|---|---|---|
| 1NF | One atomic value per cell; no repeating groups | phones list, phone1/phone2 |
A child table, one row per value |
| 2NF | Non-key columns depend on the whole key | student_name keyed by part of (student_id, course_id) |
Move to a table keyed by student_id |
| 3NF | Non-key columns depend only on the key | manager depends on department_id |
Move to a departments table |
Higher forms exist, such as Boyce-Codd normal form (BCNF) and 4NF. They handle rarer cases, and most designs stop at 3NF.
Are normalized writes faster?#
With the forms in hand, a common claim is easier to check. You often read that normalized schemas have faster writes. That's only partly true.
- Updating a shared fact is cheaper. A manager change touches one
departmentsrow instead of every employee row. This is the real win. - Creating one record can cost more. Saving one order in a normalized schema may insert into
orders,order_itemsandaddresses, each with its own indexes and foreign key checks. A denormalized design might write a single row or document. - Index and constraint costs add up. More tables usually mean more indexes and more foreign key checks on each insert.
So normalization makes updates safe and cheap for shared facts, and keeps them consistent. It does not make every write faster. Measure the write path that matters to you.
Default to normalized#
Given those trade-offs, the safe starting point is clear. Model the data normalized first. Copy data only for a particular read path that has proven too slow. Duplicated data wastes space and creates consistency problems that are usually harder to fix than the performance problem you were trying to avoid.
When denormalization makes sense#
Denormalizing is still the right call sometimes. Copying data pays off in a few specific situations:
- Analytics and reporting, where you aggregate data that rarely changes.
- Event logs and audit trails, where you want a snapshot of the data as it was at that moment.
- Heavily read-optimized systems like search indexes, where speed matters more than perfect consistency.
- Precomputed counters, like
products.review_count, derived from a normalizedreviewstable.
You can often get denormalized reads without denormalizing your database. Put a cache in front that holds a precomputed shape of the data (pre-joined rows, aggregates). The source of truth stays clean and normalized, and the cache makes reads fast.
Key takeaways#
- Normalized: each fact stored once, cheap and safe updates to shared facts, no update anomalies. Inserting one record may still touch several tables.
- 1NF: one value per cell. 2NF: depend on the whole key. 3NF: depend only on the key.
- Denormalized: copies for fast reads, but every change must update every copy.
- Start normalized and denormalize a specific read path only when you need to.
- A cache or derived table can give you denormalized reads while the source of truth stays normalized.