Database Normalization — 1NF, 2NF, 3NF, and When to Denormalize
Fast recall
Quick revision
Core answer
Whether you can identify normalization violations in a real schema and — more importantly — articulate when breaking normal form is the right engineering decision.
Treating normalization as always correct or always wrong. Junior developers either normalize everything (making reads expensive) or denormalize everything (creating update anomalies). The skill is knowing where the line is.
Give a specific example of intentional denormalization with its update strategy: what gets duplicated, how it's kept in sync, and what the acceptable staleness window is.
Interview-ready guide
Interview answer
Normalization removes redundancy — the goal is a schema where every fact lives in exactly one place, so a single update keeps everything consistent. The three normal forms each eliminate a different type of redundancy.
1NF — one atomic value per cell, no repeating groups
- Every column must hold a single indivisible value — storing tags as
"java,spring,sql"violates 1NF because SQL can't filter or index individual tags without string functions; each value belongs in its own row - No repeating column groups either —
item1,item2,item3on an order row violates 1NF because adding a fourth item requires a schema change instead of inserting a new row
2NF — every non-key column depends on the whole primary key
- 2NF only matters when the primary key is composite — if the key is a single column, 2NF is automatically satisfied
order_items(order_id, product_id, product_name, quantity)violates 2NF becauseproduct_namedepends only onproduct_id, not the full composite key — which means renaming a product requires updating every order line that included it, instead of one row in a products table- Fix: extract
products(product_id, product_name)and reference by FK
3NF — no non-key column depends on another non-key column
- Every non-key column must depend directly on the primary key, not transitively through another non-key column
employees(emp_id, dept_id, dept_name, salary)violates 3NF becausedept_namedepends ondept_id, notemp_id— so renaming a department requires updating every employee row in that department instead of one row in a departments table
In practice: OLTP schemas target 3NF; reporting and caching layers deliberately denormalize — storing customer_name on order rows to avoid a join on every report query. Make that trade-off intentionally with a documented update strategy, not by accident.
Database Normalization — 1NF, 2NF, 3NF, and When to Denormalize
Direct Answer
Normalization organizes tables to eliminate data redundancy and prevent update anomalies. 1NF requires atomic column values. 2NF removes partial dependencies on composite keys. 3NF removes transitive dependencies between non-key columns. Denormalization deliberately reintroduces redundancy—storing pre-joined or computed data—to optimize read-heavy paths, trading write complexity for read speed. The engineering skill is knowing when to break the rules on purpose and documenting the sync strategy.
Common Mistakes & Pitfalls
Treating normalization as always correct or always wrong. Junior developers either normalize everything (making reads expensive) or denormalize everything (creating update anomalies). The skill is knowing where the line is.
Check your understanding
Answer these without looking back at the article.
- When would you denormalize a column that's already in another table?
- How do you keep denormalized data in sync without triggers?
- What is the difference between 3NF and BCNF in practice?
Related interview prep categories
2Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.