Table structure help needed

Table structure help needed

am 07.08.2009 19:26:02 von Allen McCabe

--0016364270d2c909d10470908700
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I am creating surveys for our website and want store questions and answers
in a database. I found a tutorial that was useful, however it only gave
structure for a single question with one answer. My surveys need to be more
comprehensive than a poll question, and so I need some help with the
structure of my tables.

Currently, my database has these tables:
-user (for admin login, unrelated currently)
-survey_question
-survey_option
-survey_answer

Here is a breakdown of the fields for each:
-survey_question
---QuestionID - INT - primary key - auto_increment
---QuestionText - TEXT

-survey_option
---OptionID - INT - primary key
---QuestionID - INT
---OptionText - TEXT
---OptionValue - INT

-survey_answer
---AnswerID - INT - primary key
---AnswerValue - INT
---QuestionID - INT

I don't see how this can be sufficient, for example if I had a question with
multiple choices.

I want to be able to insert all surveys into these tables, taking into
consideration that there are many form input types. Can anyone let me know
if my structure is sufficient? This is all new and I'm learning as much as I
can.

Thanks!

--0016364270d2c909d10470908700--