Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6173163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:31:12+00:00 2026-05-23T23:31:12+00:00

I have a full multi-tenant database with TenantID’s on all the tenanted databases. This

  • 0

I have a full multi-tenant database with TenantID’s on all the tenanted databases. This all works well, except now we have a requirement to allow the tenanted databases to “link to” shared data. So, for example, the users can create their own “Bank” records and link accounts to them, but they could ALSO link accounts to “global” Bank records that are shared across all tenants.

I need an elegant solution which keeps referential integrity

The ways I have come up with so far:

  1. Copy: all shared data is copied to each tenant, perhaps with a “System” flag. Changes to shared data involve huge updates across all tenants. Probably the simplest solution, but I don’t like the data duplication
  2. Special ID’s: all links to shared data use special ID’s (e.g. negative ID numbers). These indicate that the TenantID is not to be used in the relation. You can’t use an FK to enforce this properly, and certainly cannot reuse ID’s within tenants if you have ANY FK. Only triggers could be used for integrity.
  3. Separate ID’s: all tables which can link to shared data have TWO FK’s; one uses the TenantID and links to local data, the other does not use TenantID and links to shared data. A constraint indicates that one or the other is to be used, not both. This is probably the most “pure” approach, but it just seems…ugly, but maybe not as ugly as the others.

So, my question is in two parts:

  • Are there any options I haven’t considered?
  • Has anyone had experience with these options and has any feedback on advantages/disadvantages?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:31:13+00:00Added an answer on May 23, 2026 at 11:31 pm

    A colleague gave me an insight that worked well. Instead of thinking about the tenant access as per-tenant think about it as group access. A tenant can belong to multiple groups, including it’s own specified group. Data then belongs to a group, possibly the Tenant’s specific group, or maybe a more general one.

    So, “My Bank” would belong to the Tenant’s group, “Local Bank” would belong to a regional grouping which the tenant has access to, and “Global Bank” would belong to the “Everyone” group.

    This keeps integrity, FK’s and also adds in the possibility of having hierarchies of tenants, not something I need at all in my scenario, but a nice little possibility.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We should have a full release of asp.net MVC well before .NET 4.0 and
I have a database full of customer data. It's so big that it's really
I have a complex table pulled from a multi-ActiveRecord object array. This listing is
I have this code for print a multi columns table from mysql $k=<table width='100%'
I have a multi-model form submission that appends all model errors into a single
If I have Full Control permission on a list, is there a way for
Does Microsoft Access have Full Text Search? I know that MySQL and SQL Server
If I start a process via Java's ProcessBuilder class, I have full access to
I have a full path which I would like to remove certain levels of
I have a full MS SQL Backup file that I would like to extract

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.