Questions tagged [multi-tenant]

A database architecture where multiple tenants share a single database or server. Also known as multi-client.

Filter by
Sorted by
Tagged with
3
votes
2answers
157 views

SQL Server - Automatically full backup for new databases which are auto-created with EntityFramework-Migrations

I have an ASP.NET MVC Application with a Multi-Tenant architecture (using SQL-Server). I'm using EntityFramework DB-Migrations which automatically generates a database per customer. In SQL-Server I ...
1
vote
1answer
26 views

PostgreSQL: Switching schema name in a loop

I am trying to switch the schema name dynamically to do some data manipulation. I am running the following. DO $$ DECLARE schema_name TEXT; BEGIN FOR schema_name in select "name" ...
0
votes
0answers
8 views

Tenant catalog pattern - logical/physical separation of catalog database

In a multi-tenant sharded database model the catalog provides the application with a way to discover which databases stores the tenant of the current interest. If you take a closer look of Microsofts ...
0
votes
0answers
46 views

Multi-Tenant Database Design - Tenant-specific Fields

I am working on an application modernization project. We run an application which keeps track of requests for medication for patients of multiple companies. One common design issue we run into keeping ...
0
votes
1answer
34 views

Multi-tenant reduce number of MongoDB connections

Our multi-tenant app has about 4000 databases per tenant and we are having a problem with performance because of too many connections. Creating MongoDB connections on each database is a heavy ...
2
votes
2answers
60 views

Should I in general partition tables by tenant IDs in a multi-tenant system?

We're building a system where the data in 10 tables is associated with Accounts. A typical table looks like this: create table Things( accountId varchar(64) not null, internalId varchar(64) ...
2
votes
0answers
50 views

Schema level encryption in Postgres

A multi-tenancy approach for many webapps is to use a separate PostgreSQL schema for each tenant. In addition to permissions and access controls, is it possible to encrypt a tenant's whole schema ...
0
votes
1answer
95 views

Most efficient table structure for multi-tenant database

I have a conventional relational database (mySQL) with several entities stored in their own table. Three examples are images, events and organisations. We are making a change to the way our site works ...
1
vote
1answer
504 views

Designing a multi-tenant database for a scenario with multiple user types

I'm developing a SaaS application for recruiting which has multiple user types such as Client, Recruiter, Panellist and Owner etc. There is also a chance that the user types may increase. The Owner ...
0
votes
1answer
29 views

With Postgresql v10 and WAL2JSON… Is it possible to include the database name / datname in the json?

We have a set of databases that were not set up in a multi-tenant fashion. Looking to build a hub that will hold the data in a multi-tenant fashion using wal2json to pipe data from source to the hub. ...
1
vote
1answer
74 views

Circular reference and multi-tenancy

I'm have an issue with circular reference in my DB design. As see the ER diagram below have 2 circular reference that I highlighted with Red and Orange arrow. Anyone know how to resolve this issue?
0
votes
1answer
52 views

Query that marries data between two databases

Database 1 is the master database where data on all domains in our client's industry are stored Database 2 (or Database N) are the application specific databases of our client. (e.g. Application ABC ...
1
vote
0answers
37 views

Tool to help breaking multitenant into a single tenant [closed]

Oracle 11.2.0.4 I've been tasked with breaking out a single customer from our multitenant system into a separate system. And the data will have to be continuously updated. This is a large system ...
0
votes
0answers
73 views

Single-tenant to multi-tenant: restore old database to schema in new database

I have a Django app which uses Postgres as a database w/ the django-tenants package providing multitenant functionality. This is a migration from what was originally a single tenant database with just ...
0
votes
1answer
47 views

Postgres Search Path between connections

I'm a noob to Postgres, and am setting up a multi-tenant database using one schema per tenant. To target each tenant I need to set search_path accordingly. I'm worried about accidentally executing ...
1
vote
0answers
24 views

Are there any downfalls to not using foreign key relationships in a multi-tenary scheme?

We have a proposed restructure of our CRM containing almost 500 databases containing ~25 tables each into a single multidimensional database with one giant fact table linking everything together. I ...
1
vote
1answer
274 views

GDPR compliant multitenant MYSQL DB

I wonder what are the GDPR constraint on a MySQL DB for a multitenant SaaS application. While a solution with a single DB per each multitenant customer and restricted access will probably be fine, ...
1
vote
1answer
179 views

PostgreSQL: How to restrict resources per DB, Schema or User

Is there a way to configure PostgreSQL server instance to limit resources, e.g. work_mem or max_parallel_workers, by databases or schema? (or even limit a specific user) To my knowledge, parameters ...
0
votes
2answers
63 views

In Oracle multi-tenant architecture, is a PDB a container?

Below is an excerpt from Oracle document. I just want to confirm, is it correct to consider a user-created PDB or a seed PDB as a container? It's a little weird to me. If this is true. Then ...
0
votes
1answer
53 views

Understanding of Oracle multi-tenant PDBs

I'm a new user to Oracle. The document states The CDB root, also called simply the root, is a collection of schemas, schema objects, and nonschema objects to which all PDBs belong. and A PDB is ...
0
votes
1answer
35 views

100+ DBs in one instance or divide and conquer : MariaDb Ubuntu 64bits

I have a desktop app (100+ customers and more to come) running at customer's small local server, all of them have same structure in tables (different info). I'm migrating that app to web ( almost ...
2
votes
3answers
2k views

Multiple instance in one server

Could you please help to explain why one might need multiple instances of SQL Server on the same server? What is a good point to use separate instances? Why wouldn't one use two databases in one ...
2
votes
2answers
125 views

What is better - having 10 databases for 10 organisations or 1 table for 10 organisation with org_id? [duplicate]

I am making a web service (using Laravel in case that is relevant) that will have many separate organisations generated by the service. Considerations I can manage all organisation data in one ...
2
votes
1answer
403 views

How to Prevent heavy queries on one database, affecting the performance of other databases on same server?

I have a linux server running just Postgres with PostGIS Extension. There are several databases on this instance of the Postrges Server. One of the databases has some computationally intensive ...
0
votes
1answer
66 views

Reference a schema from public table column

I have a multi-tenant Postgresql database with each schema belonging one of our customers (tenants). Each tenant has a table called Messages. So CustomerX.Messages contains all of the messages that ...
0
votes
1answer
228 views

Isolating access to tenant data in a multi-tenant database

We have a single SQL Server database for all tenants of a web-application. How can we ensure when a support engineer queries the DB directly via SSMS, they only touch data belonging to one tenant? ...
1
vote
0answers
69 views

Multi tenant .NET Core application

We are designing a new multi tenant .NET Core 2.1 application progra, where we are using one database per tenant. We can give each tenant a different subdomain so that we can base the tenant lookup ...
3
votes
1answer
955 views

How to do per-tenant backups for multi-tenant databases?

Are there any best practices, experiences or guidelines when it comes to do per-tenant backups/restores in a microservice multi-tenant application? In my case I have multiple Postgres servers which ...
1
vote
1answer
83 views

Is it good practice to have relationship between the tenant table and all other tables in a multi tenant application?

I am developing a multi tenant SaaS that uses Azure SQL for data storage. I make use of sp_set_session_context to make sure that any query only touches records relevant to the current tenant. I ...
2
votes
1answer
871 views

What are the downsides of using PARTITION for multi-tenant access?

We have an RDS Postgres database which keeps individual store data in a common schema with a field called store_id to distinguish between stores. Let's say we have 1MB per store and 10k stores so we'...
1
vote
1answer
121 views

MongoDB as a log storage. Choosing shard key

I'm designing a log storage system based on MongoDB. I want to shard a log collection to increase ingestion and capacity (distribute writes to several machines) while allow fast search. I should be ...
1
vote
1answer
99 views

How to build the database for subdomain multisite? [closed]

I'm building a kind of "multi site application" based on wildcard subdomain. And every site will of course have the same files but also the same database structure. But it's not necessary for each and ...
0
votes
1answer
49 views

Any DBMS with table structures and data defined separately?

I'm working on an application which is being used in multi-tenant mode, and have created a MySQL database instance, where each tenant has its own schema. The problem I'm facing is, because the ...
0
votes
2answers
220 views

Multiple databases or tables with prefix?

I was creating an Accounting ERP for a multibrach company.Normally i would keep different databases for different branches, Can anyone tell me which is the standard way? 1) create databases respective ...
0
votes
0answers
63 views

Multi Tenancy Report Solution

I have a separate database per a client although data structure is same for all databases. Only difference is all clients have their own data on their on databases. Now problem is when I need a report ...
2
votes
2answers
4k views

Multi-schema, multi-tenant databases - data isolation through composite primary keys

We are designing a multi-schema, multi-tenant database for SQL Server 2016 that will service a basic CRUD application which will see small to medium transactional throughput and comprise of 15-20 ...
1
vote
1answer
536 views

How can I be specific about which CDB I want to connect to wrapping a PDB?

I'm quite new to Oracle. I created a CDB like cdb1 and then a PDB within like pdb1. Now I can connect to my PDB using something like: sqlplus user/password@server:port/pdb1 But can't I have two PDBs ...
0
votes
1answer
569 views

CREATE PLUGGABLE DATABASE REFRESH MODE MANUAL from remote fails with ORA-00922

I'm doing some test with remote PDB cloning. Both local and remote instance are Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production PL/SQL Release 12.1.0.2.0 - Production "...
1
vote
2answers
202 views

MySQL - Design + Optimization Question [closed]

I feel like I may of made a mistake with my database design. At the moment I have 73182 tables, 4 days ago I had 72236, and just 2 months ago we only had about 20k tables - so our growth spiked. ...
0
votes
1answer
296 views

SQL Azure large multi-tenant table / lock escalation issue / partitioning / full text index

Our app organizes its data in "projects" that are saved in an SQL Azure database. A project can contain 100s or 100'000s of rows (spread over 35 tables). Since we have 1000s of projects, using a ...
1
vote
1answer
656 views

Multi-Tenant shared Users Tables: Need an advice

Am writing multiple Multi-Tenant applications with separate database per each application (I've decided to go with shared database different schema approach). Each application have Staffs Table for ...
5
votes
1answer
3k views

Recommendations on Partitioning Multi-Tenant Data in SQL-Server

I would appreciate input on design considerations for partitioning (or not) a multi-tenant business application. All data tables use a composite key that looks something like: CREATE TABLE SomeTable( ...
1
vote
1answer
224 views

How calculate per tenant disk usage in a multitenant database with tenant_id columns in postgresql

I am using Django and postgres for a multi-tenant webapp. We have around 100 tables and each table has a tenant_id column, identifying the tenant of that particular row. I need a solution that would ...
5
votes
3answers
4k views

SQL Server: Clustered index, sorting and pagination

In my application, several times I have to show results that are paginated and sorted by some field. For example a simple user list sorted by last name. Because of that and because I also have logical ...
0
votes
2answers
82 views

Common term for tenant-based keys [closed]

Assume the following schema: ID  | TENANT | TENANT_CUSTOM_ID 346 | 101    | 1 347 | 102    | 1 348 | 101    | 2 349 | 101    | 3 350 | 101    | 4 351 | 102    | 2 352 | 103    | 1 What ...
1
vote
3answers
2k views

Best way to store different types of data in a single column, which should be query friendly - MySql

I'm working on a project in which user can create their own web services from UI by simply selecting number of fields (Max 200) and defining datatype for each field. I'm considering following table ...
1
vote
2answers
1k views

Performance tuning for multi-tenant database

The database, MS SQL 2014 Standard Edition, is becoming a bottleneck in our multi-tenant web application. Aware that most performance issues can be solved by making code more efficient, however ...
0
votes
2answers
264 views

Modelling users and groups - but with multiple types of groups

I'm modelling a user management system in PostgreSQL that is fairly typical in that it consists of users, groups and permissions (and the relationships between them). However, its seems I'm dealing ...
0
votes
1answer
787 views

Multi-Tenant Design with Single DB & Single Schema approach using Sql Server

How would you design the tables which should isolate the data using TenantId in a single table? I came up with two approaches, written down the has pros and cons with my little experience, but I would ...
0
votes
1answer
483 views

Multi Tenancy and shared customers

I am developing multi-tenancy application and I have no problem with the architecture itself. I find difficult on how to make customers table shareable among tenants. This is because same customer can ...