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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:23:11+00:00 2026-05-30T08:23:11+00:00

I know there are a few related posts but I didn’t fully understand what

  • 0

I know there are a few related posts but I didn’t fully understand what to do.

I have a general idea of how to go about this. I am not too far into database design unfortunately so I require help.

Have table with questions_id, have table for possible_answer_id for each question_id.

Then have a linking table question_answers with user_id, question_id, answer_id, timestamp to register submitted forms.

But my problem is that some questions are answered with just a string so I am having trouble conceptualizing what to do about it.

e,g 
for some I need: question_id string_answer (any answer is allowed)
for others:      question_id answer_id     (out of set of allowed answers)
and perhaps:     question_id bool_answer   (true/false)

Do I add question_type somewhere so I have two different tables for this?

If the question is not clear, please let me know.

  • 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-30T08:23:12+00:00Added an answer on May 30, 2026 at 8:23 am

    Edited to take into account Eugene’s questions.

    Here are the tables that your system will need, and an explanation of each table.

    1. Person

    This table will contain all of the information about the person taking a test. The key to the table is a person id, which is an integer that automatically increments for each person row added to the table. Most current databases have an identity integer or auto-incrementing integer, which is normally the primary key of the table.

    2. Question

    This table contains all of the questions that you’ve ever thought of asking.

    The question table would contain a flag (integer or character) that would indicate the type of question, as you’ve outlined.

    • Any string answer
    • Set of allotted answers
    • True / false

    3. Answer

    This table contains the sets of answers for the questions in the Question table that require a set of allotted answers. The group key to the set of answers is the primary key of the question.

    Programatically, you would select a row from the question table. Only if the flag is set of allotted answers would you then browse the answer table in a separate SQL query.

    4. Test

    This table contains the date and time the test was created.

    5. Test Question

    This table contains the questions selected from the Question table for one particular test. The group key for the set of test questions is the Test table id.

    The reason for having a Test Question table is questions and answers can be added, changed, or removed from the Question and Answer table. The Test Questions table is a historical table in that once the rows are added, they are never changed or removed.

    6. Test Taken

    This table contains the Person id of the person that took the test, the Test id of the Test, and the date and time the test was taken.

    7. Test Answer

    This table contains the answers to the test. The group key to the set of Test Answers is the Test Taken id and the Test Question id.

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

Sidebar

Related Questions

I know there have been a few threads on this before, but I have
Firstly, I have searched for related answers, there is a few - but couldn't
I know that there have been plenty of topics describing this topic but I
I have begun to understand a few examples related to currying but I am
There were few questions related to this but none answered the question in my
So I know there is a few templating engines out there, but I thought
I know how to use locks in my app, but there still few things
Anyone know? I found a few answers, but there were too complex and going
There are some related questions here and here , but they didn't really give
I know there have been similar/related questions on SO and elsewhere, and I at

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.