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,yes. You might also want to add a NOT NULL constraint to the column|||I'd use smallint rather than int, for saving space and for efficiency.
I would not use bit, as you would have to convert to smallint every time you wanted to run an aggregate function.
Showing posts with label storing. Show all posts
Showing posts with label storing. Show all posts
Subscribe to:
Posts (Atom)