473,395 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

where should I store question and answers

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.

Jun 14 '06 #1
5 1965
you could have two tables in SQL server:
Questions and Answers with relation between them
for each row in questions you will have many answers and all you need
is flag which one is correct

hope this helps
Sukh wrote:
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.


Jun 14 '06 #2
Thanks for your promt reply..I also thought the same but the questions
are differnt types like
one question , four answers and one answer is correct, some are Match
the follwing like left side 4 questions/options and on right side 6 or
7 options so user has to match like the correct answer for 1 is 4 like
so..
to implement this I hv to store this type of questions in seprate
table...Am I correct?
and
how to pick randamly questions?
Thanks
sukh.
Galcho[MCSD.NET] wrote:
you could have two tables in SQL server:
Questions and Answers with relation between them
for each row in questions you will have many answers and all you need
is flag which one is correct

hope this helps
Sukh wrote:
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.


Jun 14 '06 #3
Thanks for your promt reply..I also thought the same but the questions
are differnt types like
one question , four answers and one answer is correct, some are Match
the follwing like left side 4 questions/options and on right side 6 or
7 options so user has to match like the correct answer for 1 is 4 like
so..
to implement this I hv to store this type of questions in seprate
table...Am I correct?
and
how to pick randamly questions?
Thanks
sukh.
Galcho[MCSD.NET] wrote:
you could have two tables in SQL server:
Questions and Answers with relation between them
for each row in questions you will have many answers and all you need
is flag which one is correct

hope this helps
Sukh wrote:
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.


Jun 14 '06 #4
Thanks for your promt reply..I also thought the same but the questions
are differnt types like
one question , four answers and one answer is correct, some are Match
the follwing like left side 4 questions/options and on right side 6 or
7 options so user has to match like the correct answer for 1 is 4 like
so..
to implement this I hv to store this type of questions in seprate
table...Am I correct?
and
how to pick randamly questions?
Thanks
sukh.
Galcho[MCSD.NET] wrote:
you could have two tables in SQL server:
Questions and Answers with relation between them
for each row in questions you will have many answers and all you need
is flag which one is correct

hope this helps
Sukh wrote:
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.


Jun 14 '06 #5
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.

Jun 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: cover | last post by:
The question is, we have two options to store images, either in a Database (MySQL, Postgres, ...) like blob data, or in the hard disk the file and the path in database. Which option is better?...
12
by: arkobose | last post by:
my earlier post titled: "How to input strings of any lengths into arrays of type: char *array ?" seems to have created a confusion. therefore i paraphrase my problem below. consider the...
1
by: Pipo | last post by:
Hi, I'm trying to store a delegate into a viewstate but I get the message that it needs to be serialized then. So I put the attribute <Serializable> in the delegate..but this isnt enough... ...
36
by: Crirus | last post by:
Hi I have about 1000 records of users to store.. I dont like the ideea of a database server... How to store does data in a structured way? An XML? How big can became such an xml, because I...
3
by: Sukh | last post by:
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...
4
by: moizpalitanawala | last post by:
Hello Friends I am having a problem in finding the solution for this Question. Please help me. I am having a number say "n". In this case let us consider n=3. What i have to do is find first...
0
Curtis Rutland
by: Curtis Rutland | last post by:
Here are the guidelines for where to post your .NET questions. Any post having to do with ASP.NET goes in the ASP.NET Answers Forum, regardless of the language used. If it's not ASP.NET, put...
0
Curtis Rutland
by: Curtis Rutland | last post by:
Here are the guidelines for where to post your .NET questions. Any post having to do with ASP.NET goes in the ASP.NET Answers Forum, regardless of the language used. If it's not ASP.NET, put...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.