advancedMulti-Tenancy in Hibernate — Schema, Database & Discriminator Strategies

What are Hibernate's three multi-tenancy strategies, and what's the core tradeoff between them?

Discriminator (shared schema, shared tables, Hibernate auto-injects a tenant filter into every query — cheapest, weakest isolation), schema-based (separate schema per tenant in one database — moderate cost, moderate isolation), and database-based (separate physical database per tenant — highest cost, strongest isolation). The right choice depends on tenant count and isolation/compliance requirements.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

What are Hibernate's three multi-tenancy strategies, and what's the core tradeoff between them?

Next Step

Continue to Why is Hibernate's built-in multi-tenancy support safer than hand-rolled per-query tenant filtering?← Back to all Spring Data JPA & Hibernate Mastery questions