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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:15:13+00:00 2026-05-18T00:15:13+00:00

I have a set of categories for a MySQL database that wont change much,

  • 0

I have a set of categories for a MySQL database that wont change much, but might on occasion. (maybe around a dozen choices)

For this sort of situation, where answers are basically multiple choice, should I just use a text field in my main table then in PHP limit the answers, or make a separate table to hold the lookup values then store the id from the category table in the main table?

Just looking for normalization best practices 🙂

  • 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-18T00:15:14+00:00Added an answer on May 18, 2026 at 12:15 am

    Both are OK, they have the following consequences:

    • Text field means the set of answers is maintained in the PHP code
    • Lookup table means the set of answers is maintained in the database

    I think it depends if they are “data” (-> database) or really part of the application (-> definitely PHP code, e.g. if you have if ($cat == 'x') { ... } anywhere in your code.)

    It sounds to me more like they are data so in that case put them in a table.

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

Sidebar

Related Questions

I have hierarchical data (categories) stored in a mySql database using the nested set
I want to store a set of categories in a mysql database field. The
I have something like Facebook's Wall build on PHP that uses MySQL database. Structure:
I have a set of data that models a hierarchy of categories. A root
I have a simple SQL table which defines a set of hierarchical categories and
I have set the eclipse java formatter to wrap lines that exceed 120 characters
I have set of flat files (114 files) each file is named with database
I have set up an app that is registered for remote notifications. - (void)application:(UIApplication*)application
Using php and mysql, I have a table subdomains that contains subdomains for my
I've got a MySQL table that acts like a nested set in order 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.