pros and cons of 3 possibilities

Contents

In this post we will see pros and cons of three different ways of Database design on the cloud specially designed to be used on SaaS platforms with many clients O “tenants”. It is what in English is known as Multi-tenant architectures.

database_design.jpg

Photo credits: cybrain

Database design for multi-tenant applications should pay attention that data and workload will be partitioned. You can divide the data and the workload, as an example, taking into account the limits of each tenant, since most requests will occur within those limits.

This type of database design is used across the spectrum of cloud-supported applications..

Isolated database design

This approach to database design requires the construction of a database for each tenant.. It is an approach associated with many benefits, like those who have to do with:

  • Personalization: this layout makes it possible to add some entity properties dedicated to the tenant, so you could say that the base schema is highly customized.
  • Scalability– The performance is very good and is maintained even when the number of tenants increases, contrary to what happens in other database design modalities.
  • Versatility: If required, it would be very easy to migrate old apps to a multi-tenant approach.
  • Security: Physical isolation of data from each tenant is the key to minimizing risk.

Despite the advantages of this approach, Before deciding to design isolated databases, it should be noted that this decision implies the need to maintain a second connection to the database, the increase in resources required for the project and the opportunity for distribution situations. uneven data. To these drawbacks must be added the difficult implementation and maintenance from said database, something to consider before launching the initiative.

Unique database design

For this case, all tenants are joined in a single database. In the, the entities are defined through foreign keys of the table that correspond to tenant identification attributes. This design approach has two great advantages:

  1. Rapid deployment: No need to create a new database or change the schema of the existing one. Every time a new tenant needs to be added, it is only necessary to insert the new entity in the database.
  2. Ease of implementation: Since a single database connection is used for an HTTP request, it is very easy to implement database change mechanisms.

But nevertheless, The design of the database thus proposed involves some drawbacks, such as scalability issues that may arise from lack of partitioning or security issues related to access to resources., if it is done without the necessary control.

Hybrid database design

The conjunction of the isolated model and the multi-client result in the design of the hybrid database., a complex structure, that needs more investment in development and that, despite this, manages to minimize the inconvenience of the other two types of databases.

The hybrid approach makes it possible to distribute to tenants, combining isolated databases for some of them, with another multi-user, for which they can be grouped according to their characteristics.

The advantages of this design approach are scalability and security, even though its drawbacks can be decisive. The complexity of the model, its difficult implementation and the condition of having resource identifiers must be unique in all databases (only then would migrations be possible) could force many institutions to opt for more accessible solutions.

When it comes to database design, each company must make the decision that best suits its capabilities and expectations., even when always keeping in mind the types of clients who will use the platform, as well as your security and availability demands.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.