Databases · Senior · Question 38 of 75

What are the trade-offs of 'shared tables with tenant_id' versus 'a schema or database per tenant' in a SaaS app?

Explanation

Many SaaS apps start shared with RLS and move large or regulated tenants to dedicated databases later. Index on (tenant_id, ...).

Further reading

Problem with a question

Databases · Senior · question 38

Test yourself

Take the Databases · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz