Last post Apr 05, 2012 09:46 AM by IAmateur
Apr 02, 2012 05:10 AM|IAmateur|LINK
In quiz project if I use 4 radio button as answers then Should I make a table for it in databse too?
I am not understndin this.
For radio button whatever is typed the same content should be written in separate table of database?
And that table should be quiz table or different table for answers?
Apr 02, 2012 05:19 AM|basheerkal|LINK
That depends upon your requirements... If you want to retrieve answers from DB you should, Otherwise not needed.
Apr 02, 2012 05:21 AM|IAmateur|LINK
But,then to match the answers and get the result ,Database is required right?
Apr 02, 2012 05:22 AM|ravibagadiya|LINK
for that you need to create three table
using this three table you can create quiz in that admin can add question in question table ,result can store in userquiz.
Apr 02, 2012 05:36 AM|raina_sunils|LINK
I think it will be good if you save the response in a seperate table. And table structure should be - (QuestionCategoryID, QuestionID, Response).
Then it will be easy for you to compare the responses...
Apr 02, 2012 05:52 AM|kirupa.v|LINK
Yes. U need to create a table in your Database.
In table u can have a field named as "TAG".
For all the four radio buttons u can have mention different tags
So that based on the radio button selected u can just send that tag to the db and result will be retrieved based on the tag from the table.
Apr 02, 2012 06:57 AM|IAmateur|LINK
why questionorder and anyrequirefield needed?
Why to have 3 tables?
I am not so sure but I thought it can be done in 2 tables also.
Apr 02, 2012 06:59 AM|IAmateur|LINK
basheerkal as per your reply does that mean this project can be done without databse also?
Apr 02, 2012 07:01 AM|IAmateur|LINK
kirupa creating separate table means it will be quiz table with 2 fields qid, tag ?
Apr 02, 2012 07:29 AM|kirupa.v|LINK
Wat i actually meant is for four radio buttons there must four different tags..
But if u place Qid as primary key then no need for a field named tag..
u can set the Id's for the radio buttons to retrieve values from the table..
Apr 02, 2012 07:36 AM|IAmateur|LINK
okay. I am actually not understanding your reply ..
sorry I am still newbie
Apr 02, 2012 07:40 AM|IAmateur|LINK
Is using drop-down list for answers is much easy than using radio button ?
Apr 05, 2012 08:05 AM|Qin Dian Tang - MSFT|LINK
It depends on your design. I suggest you create a new table for the answer options. It contains a question id for relating to the question subject. For displaying you need to generate a datasource for the radionbuttonlist. Or you can refer this sample:
Apr 05, 2012 08:28 AM|basheerkal|LINK
You have s not mentioned ..What is your project..in the beginning,,
Apr 05, 2012 09:46 AM|IAmateur|LINK
Its Quiz Project that is 1 question and 4 options