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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:03:56+00:00 2026-05-24T04:03:56+00:00

I am designing my db tables in SQL Server 2005 and have come across

  • 0

I am designing my db tables in SQL Server 2005 and have come across a small design/architecture issue… I have my main Users table (username, password, lastlogin, etc.), but I also need to store 2 different user profiles, i.e. the profile data stored will be different between the two. I’ve put all the common user data into the Users table.

Do I create separate tables for Consumers and Marketers? And if so, should the primary key in these tables be [table-name]_UserID with a 1:1 relationship on Users_UserID?

Basically, upon registering, the user will be given the choice to register as a Consumer or Marketer. When a user logs in, the Users table will be queried, and their accompanying profile will be queried from either table.

I know this approach is messy, which is why I’ve come here to ask how best this can be achieved.

Thanks!

EDIT: Additionally, in the Users table I have a Users_UserType flag that will allow me to distinguish between users when they log in, hence knowing which Profile Table to query.

  • 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-24T04:03:57+00:00Added an answer on May 24, 2026 at 4:03 am

    Your gut feeling is correct. You want to normalize your data. Using separate tables reduces data duplication, or empty/null columns.

    Unfortunantly, with a reverse relationship like this, you won’t have a nice clean foreign key from User to Consumer or Marketer because it could be one table or another.

    You would want to map a User_Id from the Consumer/Marketers table back to User though.

    You could query it in a single query using left joins:

    Select 
         u.*,
         c.*,
         m.*
         From Users u
            left join Consumers c on c.User_Id = u.ID
            left join Marketers m on m.User_Id = u.ID
         Where
            u.ID = @UserId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using SQL Server 2005 with SP4 and I am designing a database table. Here
We are designing a SQL Server database with link tables for many-to-many relations. The
I'm designing a SQL Server 2005 database for a bank to hold records relating
I've come across the page in SQL Server 2008, and is somewhat confused about
When desiging a table in SQL Server Management Studio 2005, if I specify VARCHAR(10)
This is my first time designing tables in a sql database and I have
My company is moving to SQL Server 2008 R2. We have a table with
When designing a lookup table (enum) in SqlServer 2005, if you know the number
I'm designing the Fact and Dimension tables for a data warehouse currently using SQL
I'm designing a staff rota planner....have three tables Staff (Staff details), Event (Event details),

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.