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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:21:30+00:00 2026-06-14T23:21:30+00:00

Scenario: I want to create a set of users with different types and have

  • 0

Scenario:

I want to create a set of users with different types and have another table to handle non-standard information for the different user types. So every user would have global attributes, like first name, last name, etc. Then specialized users might have attributes that differ from the generic information / global information.

So what I was thinking is create a table in mysql as normal with a primary key being an integer (int) and then having a secondary table that would contain all other extra fields with a primary key that always stayed the same as the primary key of the main user table. For instance: 1.1, 1.2, 1.3. Then the secondary table would have a maybe title and value.

I am not totally sure how I would do this or what would be the best way, but I am looking for the most efficient way for the computer itself and speed wise. I’m pretty much trying to just make an easy relation from one table to the next by matching id’s however there may be multiple extra fields related to a specific user.

So I may have a user with an id of 1 and he may have extra fields 1.1, 1.2 and 1.3 and it would be nice instead of having to search the entire table to just go to that specific number and then quit searching once the records had been found.

If this is confusing and not well explained please let me know.

Thanks in advance!

  • 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-06-14T23:21:32+00:00Added an answer on June 14, 2026 at 11:21 pm

    This is exactly what indexes are for. What you are describing is a foreign key index. they are easy to set up and extremely efficient.

    See here for more info:
    http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html

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

Sidebar

Related Questions

I have the following scenario, I want to create a DataGrid and then populate
I have a scenario where i want : To create a data class which
I have a problem with create table statement in MySQL. The scenario is, I
I'd like to set up the following database scenario: CREATE TABLE IF NOT EXISTS
The scenario is I want to get the users who has less than 2
I have a scenario where I want to prove a lemma including a number
I have a simple scenario where i want to output only json to the
I have the following scenario where I want to pass in string and a
I've got a scenario where I want to switch on two different tables in
I have a scenario where I want to reduce the margin of a Button

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.