Django ORM: The MTI vs STI Showdown
summary
Compares multi-table inheritance (MTI) and single-table inheritance (STI) patterns implemented with Django ORM on PostgreSQL, explaining when to choose each approach and trade-offs. Covers working with JSONB fields in STI (schema maintenance and efficient manipulation), using Django managers to simplify code and hide inheritance details, and mentions third-party libraries that can improve the results.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 4:21PostgreSQL inheritance
- 10:33Django ORM inheritance
- 13:27Abstract base classes
- 16:43Multi-table inheritance
- 23:52Single-table inheritance
- 28:29JSON issues and solutions
- 33:02Approach comparison and choice
- 37:51Q&A
related talks
24mThe Ins and Outs of Model Inheritance
21mDjango and PostgreSQL: An Even-Closer Union
24mMany-to-many, minus the middleman
19mData internationalization in Django
30mMulti-tenancy strategies with Django+PostgreSQL
30mLeave Your Inhibitions at the Database Connection
21mCustom Model Managers and QuerySets: Graduating from Django Beginner to ORM Master
44mPostgreSQL in Django 1.8
