If you application is small and would be contained to a workstation (as
opposed to being available as a web page hosted on a server), you may
consider that is would be a little simpler to avoid the databases
alltogether and just load up a Dataset and serialize it to disk. That way
you could always scale to a db later if you need, but don't actually have to
bother with installing a database for now.
You would still be able to release changes to the serialized dataset without
recompiling (that would be a little more work than updating a table in a
database).
I would set up the Dataset just like any other relational database with 2
tables, questions and answers:
Questions
id int identity
questionText string
correctAnswer int (pointer into one of the answers)
Answers
id int identity
fkQuestion int (foreign key to questions.id)
answerText string
To be simple about it, you could then use System.Random class to help you
pick a random question. Just make sure you seed it so that you won't end up
with the same sequence every time.
"Sukh" <su*********@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
I have to design a "Online Test Application" and application is going
to display question and answers.All the questons are objective type so
there is four answer for each question.
My Question is where I shuld store the questions and answers. and how
application can pick randomly question. right now I have all question
in a text file.
Please give me suggestion. I am using C# and asp.net for this.
Regards,
Sukh.