Using Postgres Schemas to Separate Data of Your SaaS Application in Django
EuroPython Conference via YouTube
AI, Data Science & Cloud Certificates from Google, IBM & Meta
AI Engineer - Learn how to integrate AI into software applications
Overview
Google, IBM & Meta Certificates – 40% Off
One plan covers every Professional Certificate on Coursera.
Unlock All Certificates
Learn how to implement secure and performant data separation in Django SaaS applications using PostgreSQL schemas through this 30-minute conference talk from EuroPython 2025. Discover the challenges of ensuring customers only access their own data while maintaining performance at scale, moving beyond the traditional approach of filtering tables with foreign keys. Explore PostgreSQL's schema feature as a database-within-a-database solution and master the django-tenants library for implementing multi-tenancy. Understand the distinction between shared apps containing globally accessible data and tenanted apps specific to individual customers, where data availability depends on the active tenant typically determined by subdomain. Walk through a simplified problem setup and see how django-tenants streamlines SaaS application development while maintaining the familiar Django model workflow without manual filtering requirements. Examine both the benefits of this approach and the new challenges it introduces for scalable multi-tenant architecture.
Syllabus
Using Postgres schemas to separate data of your SaaS application in Django — Mikuláš Poul
Taught by
EuroPython Conference