Multi-tenancy is a software architecture that allows the same application to be used by multiple clients, while keeping the data of each client separate. It is often used by SaaS (software-as-a-service) companies that provide services to multiple clients.
Multi-tenancy may also be referred to as multi-client or multi-environment.
Multi-tenancy can be achieved by having a single database with separate schemas for each client, or by using separate databases with shared schemas. The former approach is called a shared database multi-tenant architecture, while the latter approach is called multi-database multi-tenant architecture.
The main advantage of a shared database over multiple databases is cost savings and simplicity. With a shared database, you only need to maintain one set of code and one database server; with multiple databases, you’ll need one instance per client application and will have to manage replication between them.