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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:06:36+00:00 2026-05-28T06:06:36+00:00

Imagine you have a website with several drop-downs that are populated from the back-end

  • 0

Imagine you have a website with several drop-downs that are populated from the back-end database. The objective is to store these values in the database and retrieve them whenever you render the form.

I have seen two approaches used:

1) One table per list type:

profession_type
|id|value|

hobby_type
|id|value|

2) One table for all look-up values:

|id|type           |value|
|0 |profession_type|value|
|1 |profession_type|value|
|2 |profession_type|value|
|3 |hobby_type     |value|
|4 |hobby_type     |value|
|5 |hobby_type     |value|

Are there objective advantages to either of it. #2 seems to be more generic (you do a select from table by type to populate a specific drop-down), but the table will tend to be significantly larger than if you were to use #1. Also, if you use #2, all of the foreign keys are pointing to the same giant table. It does not seem like a big deal, but in my eyes this approach looks more convoluted.

  • 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-28T06:06:37+00:00Added an answer on May 28, 2026 at 6:06 am

    I’d go with #2. You can retrieve and cache all info and even if you add new types you needn’t change your database or your retrieval logic.

    If you are adding and changing tables you need to touch your database schema for all changes in the future and change retrieval code for the new tables.

    Furthermore your concerns for the table size are PROBABLY unfounded. Unless you have millions of rows it’ll be fine. I’m imagining some hundreds OR thousands of rows? Databases can easily handle that.

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

Sidebar

Related Questions

I have been working on a script that pulls information from a certain website.
Imagine that we have a website where users can read articles, view photos, watch
Let's imagine that we have ecommerce website that suggests 3 way for user registration:
Imagine you have a classifieds website... When searching ads you want image thumbnails of
Imagine I have a cell that I want to be red if the value
Imagine you have an entity that has some relations with other entities and you
Imagine that you want to design a tennis booking system. You have 5 tennis
Imagine, I have a website, this one offer a service. To access to this
We have a website (foo.com) that does online training. A user logs in, then
I have a classifieds website... As you might imagine, as a webmaster (administrator) I

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.