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.

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

question2 ...
answer1: ...


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

question table:

answer table:

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

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.


no i means how to struct tables.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.