~/talk

Polyglot Persistence with Django: When One Database Isn't Enough

Talkat DjangoCon US 2026 · 2026-08-24..08-28· [databases, django]
slides:none on file

Sets up Django with a PostgreSQL/SQLite default and a MongoDB document backend, installs a Django MongoDB engine, writes a Django database router and points models to each connection, and attempts migrations and transactional work. Migrations quietly skip the non-default DB and an enforced foreign key check fails with an OperationalError because referential integrity requires same-database references. Using MongoDB Queryable Encryption encrypts fields into ciphertext so filters and select_for_update stop working. Decision criteria: access patterns, compliance needs, and ongoing operational cost.

AI-written summary · about

  1. 0:00Introduction and icebreaker
  2. 0:51Back story and motivation
  3. 1:39What is referential integrity?
  4. 2:50Why use multiple databases?
  5. 4:11Django multi-database setup
  6. 6:01Database router configuration
  7. 7:31Modeling data for polyglot persistence
  8. 8:41Migrations and safety nets
  9. 10:29Referential integrity failure case
  10. 11:58Lessons learned from the demo
  11. 12:45Encrypted field challenges
  12. 13:53Tradeoffs and performance costs
  13. 14:37Three key considerations before adding a second database
  14. 15:45When polyglot persistence is worth it
  15. 16:06Summary and closing
  16. 16:26Q&A session
~/search
type to search 6,518 conferences, 143,918 speakers and 192,133 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.