Command Palette

Search for a command to run...

PHASE 7Beginner ~7 min· topic 6 of 7

Topic 7.6

Normalization

In one line

Split data by dependency to kill redundancy and update anomalies: 1NF, 2NF, 3NF.

0/7 · 0%

Think of it like this

Keeping one master copy of each piece of information instead of writing it in ten different notebooks. If a customer changes their phone number, you update it in ONE place instead of hunting down every notebook where it was copied.

Key ideas

  1. 01

    1NF: no repeating groups — one value per cell; arrays become child tables.

  2. 02

    2NF: no partial dependency — non-key columns depend on the WHOLE composite key.

  3. 03

    3NF: no transitive dependency — non-key columns depend only on the key (not on other non-key columns).

  4. 04

    The win: no duplicate truth → impossible to update one copy and miss the other.

  5. 05

    The cost: more tables, more joins — which is why prod rarely stops at 3NF for hot paths.

  6. 06

    Interview answer: 'I normalize for correctness, then denormalize deliberately for read throughput' — a complete sentence.

Java / Spring map

  • →

    JPA entities in 3NF by default; @Embeddable for 1NF violations you keep for practicality.

Code & diagrams

from one wide table to related tablesdiagram
Rendering diagram…

Explain without notes

01

Show a 2NF violation with a composite-key table (order_id, product_id, product_price)? Actually — is product_price a 2NF violation? Say why or why not.

Practice

01

Normalize a flat 'booking' CSV into 3NF tables and note each anomaly you removed.

Trade-offs

  • ↔

    Every normal form is a trade against join cost; 3NF is the sweet spot to START, not a hard finish.

Completion checklist

  • I can drive any schema from 1NF to 3NF and name the anomaly each step kills.

Back to phase