← Lessons

quiz vs the machine

Silver1080

Databases

Database Normalization

Organizing tables to remove redundancy and update anomalies.

4 min read · intro · beat Silver to climb

The Goal

Normalization organizes columns and tables so each fact is stored once. By removing redundancy you avoid update anomalies, where the same value drifts out of sync across rows.

The Common Normal Forms

  • First normal form removes repeating groups so each cell holds a single value.
  • Second normal form removes partial dependencies on part of a composite key.
  • Third normal form removes dependencies between non key columns.

A table in 3NF means every non key column depends on the key, the whole key, and nothing but the key.

Why It Matters

  • One source of truth means updates touch a single row.
  • Smaller tables reduce duplicated storage.
  • Clear relationships make integrity constraints easier.

The cost is more joins at read time, since data is split across tables. That tradeoff is why some systems later denormalize hot paths.

Key idea

Normalization stores each fact once across related tables, preventing anomalies at the cost of more joins when reading.

Check yourself

Answer to earn rating on the learn ladder.

1. Normalization mainly protects against:

2. A typical cost of a highly normalized schema is: