"Normalize until it hurts; denormalize until it works" in Django
summary
Explains why normalization must go beyond textbook normal forms with concrete Django examples of redundancy-caused anomalies, shows when historical fields must stay denormalized, and gives three actionable denormalization patterns: extend aggregate fetch. Demonstrates actual techniques: Postgres expression indexes and functions, materialized views via django-pgviews, and trigger-driven stale-flagging plus background recompute with django-dnorm (also covers lighter signal or save-hook approaches). Emphasizes profiling, concurrency pitfalls, and when caching or NoSQL are the right fixes.
AI-written summary · about
chapters (12)
- 0:00Introduction to normalization and denormalization
- 1:05What normalization prevents
- 3:32Normalization rules
- 4:55Normalization in Django
- 7:01Historical data issues
- 9:09Query expressions
- 12:00Normalize vs denormalize
- 13:03Denormalization: Extend
- 15:31Denormalization: Aggregate
- 19:26Denormalization: Fetch
- 21:54Concurrency profiling
- 22:37Advanced denormalization
related talks
36mNormalisation: Friend Or Foe
44mDenormalization With Eloquent: How, Why and When
17mOff the Beaten Path: Exploring Unusual Roads to Django Performance
18mGermany's Next Top Data Model
58mFrom Big to Very Big Data — Why Normalization Is Needed in Big Data
27mDjango - Customise your SQL
47mReal World Django Q&A
01h 06mEffective Django
