Interview › Databases & Caching
What is database normalisation, and when would you denormalise?
Databases & Caching · Intermediate level
Answer
Normalization reduces duplication and update anomalies by modeling entities in separate related tables. Denormalization intentionally duplicates or precomputes data for read performance, but it adds consistency and reconciliation work.
Technical explanation
Normalization reduces duplicated facts and prevents update anomalies.
Denormalization improves specific reads but creates consistency and reconciliation work.
The normalized OLTP schema can remain source of truth while read models, materialized views, or caches serve optimized reads.
Hands-on example
Example denormalization:
orders(customer_id) references customers(id).
Add orders.customer_name_at_purchase for immutable order history.
Backfill:
UPDATE orders o SET customer_name_at_purchase = c.name FROM customers c WHERE c.id = o.customer_id;
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Databases & Caching interview questions
- What is Amazon RDS, and what does it manage for you versus self-managed databases?
- What database engines does RDS support?
- What is the difference between RDS and Aurora?
- What is Multi-AZ in RDS, and how does automatic failover work?
- How long does an RDS Multi-AZ failover typically take, and what triggers it?
- What is the difference between Multi-AZ and a read replica?
- When would you use a read replica, and can it become a standalone database?
- Can a read replica be in a different region, and why would you do that?