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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:16:46+00:00 2026-05-26T09:16:46+00:00

I am thinking about how to set up my Database for an upcoming project.

  • 0

I am thinking about how to set up my Database for an upcoming project. The project is a one page internal company quiz app. Users answer the questions, enter their name and email, and if they get them all right they are entered into a “lottery” for a prize.

There are 4 sets of questions that get released every month. I want track all the answers to all the questions for all users so I can generate that data in the admin section. There are 5 questions for each month, and each question is multiple choice.

My first thought was to make a column for each question, and name them like so: M1Q1, M1Q2, M1Q2 and then for month two M2Q1 etc. That is 20 columns for each user, and seems unnecessary.
Should I store an “array” of answers for each month? Or any other way?

There is a similar question here: MySql database design for a quiz But I dont need to store questions, I just need to save each users questions for all the months. I am using rails, so I have access to domain logic etc versus the above question.

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. Editorial Team
    Editorial Team
    2026-05-26T09:16:46+00:00Added an answer on May 26, 2026 at 9:16 am

    You can use two tables. One has four columns:

    userid month question answer
    1      1     1        A
    1      1     2        C
    1      1     3        B
    etc...
    

    Primary key is (user, month, question).

    The userid is a foreign key to a user table where information about the user is stored.

    • 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 and was thinking about the need for a one
Thinking about getting into .net technology project management I've had plenty of experience with
I have been thinking about database design lately and I have the following question:
I'm just thinking about MySQL database design and there are often situations where A
I am confused about how to set up a RESTful rails app. I have
Thinking about a Windows-hosted build process that will periodically drop files to disk to
Thinking about my other problem , i decided I can't even create a regular
Thinking about avoiding code replication, I got a question that catches me every time
Thinking about if we modify the definition of Hamiltonian path as we need to
Without thinking about it at all I just want to say I should allow

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.