Multi-Tenant Databases

Schema per tenant; row-level.

Overview

Multi-tenant database design chooses how to isolate tenant data: row-level (tenant_id on every table), schema-per-tenant (Postgres schemas as the boundary), or per-tenant database (the strongest isolation, the highest cost). Each model trades scale against isolation differently. Most SaaS architectures land on hybrid: row-level for the main fleet, schema-per-tenant for select customers, per-tenant database for enterprise tier where the contract demands it.

The approach

The practical approach is row-level by default for the main fleet (with Postgres RLS or strict application-layer scoping), dedicated database for enterprise customers whose contracts demand it, schema-per-tenant only when the tenant count fits the operational complexity, and documented per-table isolation pattern committed to the schema documentation so the model is reviewable. The choice locks in the architecture for years; getting it right at design time matters more than for almost any other database decision.

Why this compounds

Multi-tenant database discipline compounds across the SaaS lifetime. Each correct isolation choice avoids the painful migration when an enterprise customer demands isolation that the row-level model cannot provide; each documented model survives team turnover; the team builds intuition for tenant-isolation tradeoffs that pays off on every new feature.

Multi-tenant database discipline is an architectural discipline that pays off across years. Nova AI Ops integrates with database telemetry, surfaces tenant patterns, and supports the team’s SaaS architecture discipline.