x

HELP! Multiple Choice!!!!!

Please help! I am trying to find a way to create a multiple choice test, using SQL.
The test requires the question, multiple choice answers, and at the end to show a percentage as a result of how well the test taker has done, and to show the actual results of the test. The most important element is for the tables to be able to detect whether the test taker has submitted a right or wrong answer, and show this at the end of the test. This is for a website that will be up and running in a few days. No one in my office has any idea of how to do this, and its my job to find out. I only started working here 3 weeks ago as an apprentice, and i literally knew NOTHING when i started, and im still not 100% on everything, so any help would be appreciated! Thanks.
more ▼

asked Jan 12 '12 at 06:36 AM in Default

Amber-Rose gravatar image

Amber-Rose
58 5 6 8

Sad to say with your question worded in that manner you are not likely to get any answers. You might want to provide more detailed information as to why you need this and what you exactly want. If you are looking for a silver plater with the answer, wishful thinking.
Jan 12 '12 at 06:44 AM Shawn_Melton
Nah, I was willing to meet her half-way on this one.
Jan 12 '12 at 06:46 AM Grant Fritchey ♦♦
Well you have all that spare time, unlike the rest of us here ;)
Jan 12 '12 at 06:47 AM Shawn_Melton
Better now? ;)
Jan 12 '12 at 07:11 AM Amber-Rose

@amber-rose - a few others have alluded to the point that this might be a homework question.

Can you tell us whether it is or not please?

There is no reason for it not to be, we just want to make sure we offer help at an appropriate level. We love having students ask questions here are it gives us the chance to avoid people learning the wrong way.
Jan 12 '12 at 07:17 AM Fatherjack ♦♦
(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

This sure sounds like homework. If I do the homework for you, do I get the grade?

Let's think this through logically. You have a test. That test has questions. Each question has a list of possible answers. There are three tables (maybe four or five depending on if you want to reuse questions in multiple tests or answers in multiple questions). On top of that you have a test taker. That test taker has answers to a test. There are another couple of tables (although, again, you could make it more flexible with many-to-many joins, but you don't need that much to meet the base requirements).

You need to just create the table structures, some primary keys and foreign keys now. Should be pretty easy from here.
more ▼

answered Jan 12 '12 at 06:45 AM

Grant Fritchey gravatar image

Grant Fritchey ♦♦
90.5k 19 21 74

Well, you got in there before me and it seems we're on the same wavelength here. I give you an B+ (you didn't show your work) ;)
Jan 12 '12 at 06:52 AM WilliamD
I hate that requirement. Isn't getting the right answer enough?
Jan 12 '12 at 06:56 AM Grant Fritchey ♦♦
Thank you so much! Very helpful! :)
Jan 12 '12 at 06:59 AM Amber-Rose
@Grant - just being pedantic! I hated it when teachers said that to me too.
Jan 12 '12 at 07:01 AM WilliamD
I know. I was just whining at you the way I used to whine at my teachers.
Jan 12 '12 at 07:07 AM Grant Fritchey ♦♦
(comments are locked)
10|1200 characters needed characters left

A multiple choice test would be built up in a similar way to pretty much any other data model.

A test has questions, a question has answers. A test has test takers and they mark which answer belonging to a question they think is the right one.

We will gladly support your efforts if you post them on this site, but I doubt anyone will design the entire thing for you.

I may be wrong, but this sounds like homework. If so, it should be made clear when asking the question. And I may be being cheeky, but placing a deadline of tomorrow makes it seem like you have left it to the last minute.
more ▼

answered Jan 12 '12 at 06:49 AM

WilliamD gravatar image

WilliamD
25.8k 17 19 41

Hi, i only got given this to find out about an hour ago, my boss needs an answer before tomorrow and none of us here have a clue how to do it, this seemed like the logical way of finding out! this has been such a help already, so thanks alot!
Jan 12 '12 at 06:59 AM Amber-Rose
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1933
x672
x22
x10

asked: Jan 12 '12 at 06:36 AM

Seen: 1707 times

Last Updated: Jan 12 '12 at 07:31 AM