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

  • Home
  • SEARCH
  • 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 105489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:26:50+00:00 2026-05-11T01:26:50+00:00

My experience with MySQL is very basic. The simple stuff is easy enough, but

  • 0

My experience with MySQL is very basic. The simple stuff is easy enough, but I ran into something that is going to require a little more knowledge. I have a need for a table that stores a small list of words. The number of words stored could be anywhere between 1 to 15. Later, I plan on searching through the table by these words. I have thought about a few different methods:

A.) I could create the database with 15 fields, and just fill the fields with null values whenever the data is smaller than 15. I don’t really like this. It seems really inefficient.

B.) Another option is to use just a single field, and store the data as a comma separated list. Whenever I come back to search, I would just run a regular expression on the field. Again, this seems really inefficient.

I would hope there is a good alternative to those two options. Any advice would be very appreciated.

-Thanks

  • 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. 2026-05-11T01:26:51+00:00Added an answer on May 11, 2026 at 1:26 am

    C) use a normal form; use multiple rows with appropriate keys. an example:

    mysql> SELECT * FROM blah; +----+-----+-----------+ | K  | grp | name      | +----+-----+-----------+ |  1 |   1 | foo       | |  2 |   1 | bar       | |  3 |   2 | hydrogen  | |  4 |   4 | dasher    | |  5 |   2 | helium    | |  6 |   2 | lithium   | |  7 |   4 | dancer    | |  8 |   3 | winken    | |  9 |   4 | prancer   | | 10 |   2 | beryllium | | 11 |   1 | baz       | | 12 |   3 | blinken   | | 13 |   4 | vixen     | | 14 |   1 | quux      | | 15 |   4 | comet     | | 16 |   2 | boron     | | 17 |   4 | cupid     | | 18 |   4 | donner    | | 19 |   4 | blitzen   | | 20 |   3 | nod       | | 21 |   4 | rudolph   | +----+-----+-----------+ 21 rows in set (0.00 sec) 

    This is the table I posted in this other question about group_concat. You’ll note that there is a unique key K for every row. There is another key grp which represents each category. The remaining field represents a category member, and there can be variable numbers of these per category.

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

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Never use these styles for a drop down list. It… May 11, 2026 at 11:51 pm
  • Editorial Team
    Editorial Team added an answer I finally decided to use xhtmlrenderer. It perfectly fits my… May 11, 2026 at 11:51 pm
  • Editorial Team
    Editorial Team added an answer I've recently been able to come back to this, and… May 11, 2026 at 11:51 pm

Related Questions

I am getting the error OperationalError: FATAL: sorry, too many clients already when using
I'm not very familiar with cake.. So here's my questions.. we're developing an app
I've worked with MySQL and MSSQL for some time and have used a variety
To follow on from my question yesterday.... MySQL Table Design for a Questionnaire I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.