Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

database design for storing True/false questions

Hai,

I am trying to design a database for storing trule/false questions.
I have no need to store any thing like chapters are topic. I want to just design a bare minimum tables for just storing questions and its responses.
So does the following tables and fields suffice to achieve that?.

Questions_table(id(autogenerated),course_id,Questi on(text type))
id field uniquely identify each question, course_id(ex:CRS235) is used to identify which course a particular question belongs to, and Question filed store actual question.

Response_table(id,response)
Response field is of int type, 1 for correct answer, 0 for wrong answer. I am not storing options for each question because every question has same options that is True/False.

So, will this work?. Please advice and I would appreciate if any one can point me to a good resource on the web.

Thanks,
[911 byte] By [srinivasc_it] at [2007-11-11 10:23:07]
# 1 Re: database design for storing True/false questions
I would include a unique ID for responses as well, so the response_table would look like this:

Response_table(id(autogenerated), question_id, response)

Otherwise, your design looks fine.
Phil Weber at 2007-11-11 23:43:23 >