How-to store a questionary in database
How-to store a questionary开发者_如何学C in database and maintain it using Enity Framework and ASP.NET ?
I have couple of question with certain numbers of answers.This questions are part of an users registration formular.
Something like:
Aaaaaaaa?
Checkbox1 - bbbbbbb Checkbox2 - ccccccc Checkbox3 - ddddddd Checkbox4 - eeeeeee
and more questions..
I would set the tables up like the following, though it would depend on what you intend to do with the results of the questionnaire and if you are planning on adding questions.
- Questions Table:
- Fields:
question_id, question_text
- Fields:
- Answers Table
- Fields:
answer_id, question_id, answer_text
- Fields:
- Results Table
- Fields:
result_id, answer_id, question_id, user_id, others_as_necessary
- Fields:
I hope this answers what you are asking, if not please clarify.
精彩评论