Introduction to Denormalization
What you'll learn: You'll discover what denormalization is and when intentionally breaking normalization rules can actually help your database performance.
What Is Denormalization?
After spending considerable effort normalizing your database to 3NF or BCNF to eliminate redundancy and anomalies, denormalization might seem backward—but it's a strategic compromise. Denormalization is the deliberate process of adding redundancy back into a normalized database to improve query performance.
Think of it like this: normalization is like organizing a library with each book in exactly one place, requiring you to visit multiple sections to gather related materials. Denormalization is like keeping photocopies of frequently-needed chapters at each desk—more storage space, but faster access.
When Does Denormalization Make Sense?
You might denormalize when:
- Read-heavy workloads: Your application performs far more SELECT queries than INSERT/UPDATE operations
- Complex joins are too slow: Joining five tables for every page load becomes a bottleneck
- Reporting needs: Aggregated data is calculated repeatedly instead of pre-computed
- Specific performance hotspots: One critical query dominates your performance profile
Common Denormalization Techniques
- Storing calculated totals (instead of computing via SUM every time)
- Duplicating frequently-joined columns across tables
- Creating summary tables for reporting
- Storing derived data (like full names alongside first/last)
The Trade-off
Denormalization trades data integrity and update complexity for query speed. You now must maintain redundant data consistently across multiple locations. This is an engineering judgment call based on your specific requirements, not a blanket rule.
Key Takeaway: Denormalization is a deliberate, performance-driven technique that reintroduces controlled redundancy into a normalized database—use it when read performance justifies the added complexity of maintaining duplicate data.