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 266563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:27:18+00:00 2026-05-11T23:27:18+00:00

Just curious what is the best practice for solving the following issue. I have

  • 0

Just curious what is the best practice for solving the following issue. I have institutions, accounts and users tables. Institutions and accounts have a one-to-many relationship. Institutions and users have a one-to-many relationship. Users and accounts have a many-to-many relationship or alternatively they could have a many-to-all (or *) accounts. Meaning, that a user could be designated to all accounts, and any new accounts that are added to the institution the user would have access to without explicitly adding the relationship.

  • 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-11T23:27:18+00:00Added an answer on May 11, 2026 at 11:27 pm

    I’d do it like so:

    Institutions
        InstitutionID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
        Name VARCHAR(255)
    
    Users
        UserID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
        Username VARCHAR(255) NOT NULL
        InstitutionID INT NOT NULL
    
    Accounts
        AccountID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
        Account VARCHAR(255) NOT NULL
        InstitutionID INT NOT NULL
    
    Users_Accounts
        Users_AccountsID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
        UserID INT NOT NULL
        AccountID INT NULL
    

    Have a UserID w/ a NULL entry in the Users_Accounts table have global (*) access. This way, you can determine the Institution on any Account and/or User, as well as their permissions.

    Edit: Columns w/ the same name in different tables imply a Foreign Key. Please use them if you aren’t doing heavy loads.

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

Sidebar

Related Questions

I'm just curious, what is considered the best practice for the following example: I
I am curious what the best practice is. For example we have product entity,
Just curious if this is the best practice for initializing a dynamic, multidimensional array
Just curious what the best practice is for accessing an instance variable from within
Just curious to know what the best practice would be for something like this:
Just curious what the experience has been in uploading MS Access tables to SharePoint
Just curious. If you have 4Gb of free memory and you create 10k of
I'm curious what would be the best practice to extend the Date constructor. The
I'm curious to know what are considered as best practice when upgrading Xcode. Say
First MVC project, just curious what the best way to manage this is. All

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.