0

i creating a shopping website online for a store. and i wanted to add polls to get user input, than store in database.
i wasnt sure how to set up tables.

we going to have alost of questions. each question will have 3 to 4 answers. user can click on answers. onces the user has picked a answer than he/she cant not answer the same question again.

ex
question1: you farvite bread?
answer1: wheat
answer2: white
answer3: grain

question2 ...
answer1: ...
answer2:...

etc...

my idea to keep track of questions and how many times user click on answers:

question table:
-question_id
-user_id
-questions

answer table:
-answer_id
-question_id
-answer

issue iam having is that answer can be 3 or 5 different types.

2
Contributors
3
Replies
16
Views
4 Years
Discussion Span
Last Post by hwoarang69
0

If you are referring to data types when referring to the answer, if you are using MSSQL, there is a data type called SQL Variant and its common for the use of storing different types of data.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.