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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:11:39+00:00 2026-05-19T04:11:39+00:00

I am designing a database that contains questions, answers and categories. One question can

  • 0

I am designing a database that contains questions, answers and categories.

One question can belong to many categories, and one category can have many questions.
So this relationship is a many-to-many.

One question table
One category table
One table containing primary keys of the two tables above

So now my question is, is it necessary or “better” to store answers (a, b, c, d, e) in a own table named answers? Then the answer table has a foreign key to the primary key in the question table.

Or should I just have 5 columns in the question table containing the answers as well with the correct answer?

After what I read it is not normal to have a one – to – one relationship.

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-05-19T04:11:40+00:00Added an answer on May 19, 2026 at 4:11 am

    Make a separate answers table. There are two benefits:

    1. It fits in relational paradigm — one question linked to many answers.
    2. You will have flexibility, in case, if options for answers goes beyond 5.

    The answers table should look like this:

    ANSWERS
      answer_id (PK)
      answer_text
      is_correct
      serial_number
      question_id (FK)
    

    Now, you store one answer in one row… and for serial_number (a,b,c.. or 1,2,3.. or i, ii, iii,… whatever) you use serial_number field. is_correct points to correct answer/s.

    You can select list of answers by

      select * from `answers` where question_id = 123 order by serial_number asc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am designing a database that contains photos. A photo can have none or
I have this database that I'm designing. It needs to contain a couple dozen
ORIGINAL (see UPDATED QUESTION below) I am designing a new laboratory database that tests
I am designing a database for a project. I have a table that has
Assuming that best practices have been followed when designing a new database, how does
Suppose I am designing a class that can handle any database technology to create
Right now we have a dll file that contains all the database calls and
I have a small database that I need help designing. I have a VB.NET
I have an object that contains the date of an event. In the database,
We're designing a database that has a simple table called Person. Each person can

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.