54 votes

Do multi-tenant DBs have multiple databases or shared tables?

According to Microsoft, the term has 3 potential meanings (one database for all tenants, or one databaser per tenant). To use your example, each customer would be it's own tenant. A database per ...
lmms90's user avatar
  • 669
36 votes
Accepted

Do multi-tenant DBs have multiple databases or shared tables?

Which of these paradigms constitutes a traditional "multi-tenant" DB Both concepts are called multi-tenancy, since it is just a logical concept "in which a single instance of software runs on a ...
Doc Brown's user avatar
  • 207k
14 votes

What exactly is a multi-tenant application?

Yes, that's it. But wikipedia's definition is not general enough. It does not address multi-tier architectures or newer forms of architecture like SOA or microservices. Multi-tenancy is about ...
Christophe's user avatar
  • 77.2k
11 votes
Accepted

Multi-tenancy...as opposed to what?

I think your confusion is between the technical term "client" (as in client-server) and the business term "client" (as in, a paying customer). Multi-tenancy usually implies a server serving multiple ...
Avner Shahar-Kashtan's user avatar
7 votes

Multitenant app or separate instance for every customer

There are some trade-offs that you'll have to do: 1.Dedicated instances Advantages: No additional development needed nor conceptual work (less time and cost to market the product) Every ...
Christophe's user avatar
  • 77.2k
7 votes

What are the advantages of using multi-tenant architecture with separate db schemas per customer?

"I think it would add a level of complexity to the app" ... opposed to what - using just one schema for all tenants? Then typically the opposite is true. Implementing multi-tenancy in one schema ...
Doc Brown's user avatar
  • 207k
7 votes
Accepted

Techniques for efficiently partitioning data in a shared multi-tenant database

The primary concerns of this design are security and size. But before I get there, I want to clear up a misunderstanding: As wrong as it seems, would it be better to sacrifice normalization and ...
kdgregory's user avatar
  • 5,250
6 votes

Logical separation of database content

While I'm not really an experienced architect, but as the question stands, you might not want to change much at all. You just add a Blogs table, and a "blog_id" column to posts (just as your "comment"...
Misamoto's user avatar
  • 229
6 votes
Accepted

Multi tenant in a micro-service

Bottom Line Up Front: You will likely have to start with a compromise. Micro-services, and multi-tenancy are hard. You have to consider the trade-offs on cost to run, maintain, and build your ...
Berin Loritsch's user avatar
5 votes
Accepted

How to handle common data in multi-tenant applications

I need to use some common database which then prevents me from joining tables in the natural way, or using e.g. EntityFramework out of the box. You can use EntityFramework.DynamicFilters for this. It ...
Flater's user avatar
  • 49.8k
5 votes

Using Redis as a cache in a Multi-Tenant application

After further research I am satisfied with an answer so I will answer my own post. I see that Microsoft recommends using a prepended-tenant (client ID in this case) in this particular article: https:/...
Brad's user avatar
  • 425
5 votes

Multitenancy with Cross-Tenant Users

I agree with Robert H. that there is an overarching problem here with terminology. Your customer is not using the terminology consistently or correctly, so any requirements discussions using that ...
John Wu's user avatar
  • 26.5k
4 votes

How should multi-tenancy be implemented for child resources in a SaaS database design?

If all code fetching data from the database is written correctly, then there is no need to have tenant id on each table. However, in practice bugs are inevitable, so there will at some point be ...
Joeri Sebrechts's user avatar
4 votes

How to handle db authentication in multi tenant application with separate databases?

Don't put all the authentication data in the shared database. Instead of storing tenant identity and authentication details in a separate database, you can store identity (username) and redirection ...
JeffO's user avatar
  • 36.8k
4 votes
Accepted

Logical separation of database content

You nailed the two obvious choices. But neither is quite as hard as you say, and which makes more sense depends on how much you expect to do in integrating content of one blog in another. Separate ...
Lewis Pringle's user avatar
4 votes

Should I de-normalize my DB schema for a multi tenant application

There is a linguistic trap in your question. Multi-tenant can mean different things in your example: If tenant just happens to be an entity like any other and “multi-tenant” is about indirect one-to-...
Christophe's user avatar
  • 77.2k
4 votes
Accepted

Modular monolith vs microservices for hybrid multi-tenancy

To me, the question about customization is orthogonal to the micro services/modular monolith question. I.e. they are not really related. From what I have read the main benefit of micro-services seem ...
JonasH's user avatar
  • 4,833
3 votes

What are the advantages of using multi-tenant architecture with separate db schemas per customer?

A multitenant architecture has the benefit of scalability as well as security. When you have all the client data in one table, all customers has access to all customer data, not calculating the code ...
superhero's user avatar
  • 337
3 votes

Multitenant app or separate instance for every customer

If you build the app to support multiple tenancy, then your future tech reps will have a choice about how to deploy it. If you find a customer who insists on a single-tenant instance, you will be ...
O. Jones's user avatar
  • 419
3 votes

Scalability: Millions of tables vs one big master table and millions of views

Ok heres my vague architectual advice. I think you are correct in equating the folders to indexes on a single table rather than schemas. But accessing a single table through views can occasionally ...
Ewan's user avatar
  • 75.6k
3 votes

Checking tenant information in microservices

Since you are using micro-services I am guessing that you are using token based authentication/authorization which means that you have a signed token in which you can securely pass data from a client ...
panda's user avatar
  • 171
3 votes

Multitenancy with Cross-Tenant Users

In short Yes this can make sense, for example in combination with SSO, but it weakens the independence of the tenants. More infos In principle, in a multi-tenant architecture, you want each ...
Christophe's user avatar
  • 77.2k
2 votes

Multitenant app or separate instance for every customer

The choice is not clear at all, and you could easily do a hybrid approach. For example, Atlassian allows to use their tools (Jira, Bitbucket etc) on their server, but also let you install on your own ...
Eiko's user avatar
  • 785
2 votes

How to manage context objects in a multi tenant application?

As I see, your problem is, that you try introduce web service's implementation details (Context) as abstraction. "Leak abstraction" the name for this problem. Consumers of web service doesn't need ...
Fabio's user avatar
  • 3,126
2 votes

Single Database Vs Multiple Database on SQL Server

How oranges are different from lemons? I mean, are they “structurally different” like a Product is structurally different from Person or from Comment, or they are just different forms of the same ...
Arseni Mourzenko's user avatar
2 votes

Multitenant app or separate instance for every customer

I've seen 2 developments happen in every application that I've worked on that was multi-customer but single tenant: A feature is only required for one specific customer who wants to pay for it. Even ...
jdog's user avatar
  • 280
2 votes

Composite-keys in multi-tenancy application for administrative actions

In our multi-tenant application, we separated the users out from the other tenant-based stuff, and instead added a separate permission management which is tenant-based. This then allows you to grant ...
Lucero's user avatar
  • 169
2 votes

Techniques for efficiently partitioning data in a shared multi-tenant database

I would suggest you look into table partitioning. With table partitioning, your application would still see a single "logical" table that it works with; however, physically, each client's data could ...
John Wu's user avatar
  • 26.5k
2 votes

How to properly use a database containing common tables in a multi-application system?

I'm seeing a need for common tables, which then has exploded into multiple databases. This would concern me. Separating the application tier into multiple applications can be a good place to start, ...
Greg Burghardt's user avatar
2 votes
Accepted

How to properly use a database containing common tables in a multi-application system?

I like option 1. Your apps are then ignorant of their underlying persistence schema and the persistence management is done by the API (or layers below/within). A common route would be your #1 option,...
jleach's user avatar
  • 2,682

Only top scored, non community-wiki answers of a minimum length are eligible