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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:57:13+00:00 2026-05-26T15:57:13+00:00

I have one table [Users] and another table [Administrators] linked 1:0..1 . Is it

  • 0

I have one table [Users] and another table [Administrators] linked 1:0..1 . Is it best practice to merge these tables? I have read a lot of answers on SO stating splitting tables is only necessary for one-to-many relationships.

My reasoning for separating them is so I can reference administrators with AdministratorId rather than the general UserId. In other tables I have fields which should only ever contain an administrator so it acts as a referential check.

  • 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-26T15:57:14+00:00Added an answer on May 26, 2026 at 3:57 pm

    I think the best option is to have two tables for the two different entities, Users and Administrators, possibly with the same Primary Key.

    CREATE TABLE User
    ( UserId int
    , ... other data               --- data for all users
    , PRIMARY KEY (UserId)
    ) ;
    
    CREATE TABLE Administrator
    ( AdministratorId int
    , ... other data               --- data for administrators only
    , PRIMARY KEY (AdministratorId)
    , FOREIGN KEY AdministratorId
        REFERENCES User(UserId)
    ) ;
    

    This way, as you mention, other tables can reference the AdministratorId:

    CREATE TABLE OtherTable
    ( OtherTableId int
    , AdministratorId int
    , ... other data
    , ...
    , FOREIGN KEY AdministratorId
        REFERENCES Administrator(AdministratorId)
    ) ;
    

    Benefits:

    • referential integrity is trivially implemented.
    • the relevant data (for Users and Admins) can be stored in the relevant tables so you have less columns in the tables and fewer NULL data.
    • any query that needs a JOIN to Administrator table will have to look up only a few rows, compared to the (possibly huge) number of rows of the User table. If you have only one table, you’ll end up with code like:

      WHERE User.admin = True

      which may not be easily optimized.

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

Sidebar

Related Questions

What I have is a two tables. One table with users and another table
I have three tables, table one (tableA) containing users data like name and email,
I have a table containing users... one way or another some users were doubled
I have one table with USERS and another table with RSS FEED URLS. Both
I have one table users with 2 fields : id , name and another
I have one table - Users - and I have another table - Colors.
I have one database table dealing with users login totals and another table dealing
I have two tables.One table contain the values +---------+ Users ---------+ A B C
I have one table that has sales records and another table that has additional
Another question which has me perplexed: I have a table which enables users to

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.