90 likes | 158 Views
Architecting databases for multi-tenant SaaS (Software as a Service) applications can be challenging and there are various aspects like security, flexibility, cost, maintenance etc. which must be kept in mind while designing such a database. In a multi-tenant architecture, a single instance of the application serves multiple customers who all share either a database or have their own databases. The three approaches that can be followed in the case of multi-tenant architecture are... For Detail info please visit: https://www.capitalnumbers.com/blog/database-architectural-patterns-for-multi-tenant-saas-applications/
E N D
Database Architectural Patterns For MULTI-TENANT SAAS APPLICATIONS
MULTI-TENANT VS SINGLE-TENANT In multi-tenant architecture, a single instance of the application serves multiple customers who all either share a database or have their own databases. In single-tenant architecture, a single database supports a single instance of the software. VS
THE THREE APPROACHES TO MULTI-TENANT ARCHITECTURE The three approaches that can be followed in the case of multi-tenant architecture are: Separate databases, separate schema Shared database, separate schema Shared database, shared schema
SEPARATE DATABASES, SEPARATE SCHEMA Tenant A Tenant B Tenant C This architecture ensures the highest level of data security where every tenant has its own database instance physically separated. One tenant cannot access data for the other tenants. SaaS Applications Tenant A Database Tenant B Database Tenant C Database
SHARED DATABASE, SEPARATE SCHEMA Tenant A Tenant B Tenant C This architecture serves multiple tenants under the same database, where each tenant has its own set of tables grouped by schema created specifically for that tenant. SaaS Applications Tenant A Database Tenant C Database Tenant B Database
SHARED DATABASE, SHARED SCHEMA Tenant A Tenant B Tenant C This architecture involves using the same database and the same set of tables/schema to host multiple tenant data. A Tenant ID associates each tenant with the rows that it owns. SaaS Applications Shared Database, Shared Schema
PROS AND CONS Shared Database, Separate Schema Shared Database, Shared Schema Separate Databases, Separate Schema Factors Security High Medium Low Flexibility High Medium Low Cost High Medium Low Maintenance High Medium Low
KEEP IN MIND: When thinking about the correct approach, carefully consider: The number of tenants Amount of stored data Security requirements
CONCLUSION If you’d like help developing your multi-tenant software, contact us. Multi-tenant architecture gives the power and versatility to build an application with resource sharing in mind. https://bit.ly/2yif7wx