Question:

How do i insert multiple choice questions with options and answers into MS SQL database?

by  |  earlier

0 LIKES UnLike

should i copy questions and answers and paste in every cell? i have around 10000 questions///

 Tags:

   Report

3 ANSWERS


  1. With three tables for each item. One for the questions, another for the options and a third for the answers. You could do it with two by combining the questions and options into one table but it's not as flexible if you have variable number of options per question.


  2. My guess is that you have your questions in some kind of program (ie Excel).  In the case of excel, save the files in CSV format: you can then upload them into mySQL using Cpanel.

    If not, write a small program to read each question, format it into csv format and upload.

    It really depends on what format your questions are at this time!


  3. Multiple choice is probably the easiest type of Q/A database to implement. One possibility:

    Questions (num question_ID (PK), varchar question_text)

    Answers (question_ID (FK/PK), num answer_ID (PK), varchar answer_text, bool correct)

    Responders (num responder_ID (PK), ...)

    Responses (responder_ID (FK/PK), question_ID (FK/PK), answer_ID (FK/PK))

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.