question

Amber-Rose avatar image
Amber-Rose asked

SQL Results?

Hello! I am trying to create a multiple choice test which will be available online soon, hopefully. The problem I am having is working out how I can use SQL to build the test, so the result of the test is added up and shown at the end of the test, the test taker can see their answers (right and wrong) and show the final results as a percentage at the end. I only started my apprenticeship 3 weeks ago so I am still not fully confident on some aspects of SQL, so any help would be much appreciated! Thanks!
sqlhelptest
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

WilliamD avatar image WilliamD commented ·
As with your first post, you need to offer up some of your work for us to help you with. The idea here is to show us what you have and go from there. We will gladly assist, but not write the entire thing for you.
0 Likes 0 ·
Amber-Rose avatar image Amber-Rose commented ·
Thank you, We have not yet started ANY work on this, because before we start, we need to know whether it is possible to do it or not, and a way to do it, so that we can feed back to the company which we are building it for! :)
0 Likes 0 ·
Grant Fritchey avatar image
Grant Fritchey answered
Ah, we didn't talk about grading the tests last time did we? When you set up the database you'll need to mark some of the answers as correct in the table that defines answers. Then, when you have all the test takers answers, you can join back to the answers table to correlate between correct and wrong answers on each question. In short, yes, it's doable. Just remember that SQL Server can return the results. To make the formatting pretty you need to use something else, either code or a SQL Server Reporting Services report or something.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Amber-Rose avatar image Amber-Rose commented ·
Thanks! HUGE help!
0 Likes 0 ·
Sharma avatar image
Sharma answered
You can create one question master table to join with user transaction table to get correct or incorrect result set. > CREATE TABLE TEST_Question(Ques_NO. > INT NOT NULL IDEINTITY(1,1), Question > VARCHAR(MAX) NOT NULL,Answer1 > VARCHAR(100),Answer2 > VARCHAR(100),Answer3 > VARCHAR(100),Answer4 VARCHAR(100), > Correct_Answer VARCHAR(100))
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image
Fatherjack answered
Is there a business process that represents the work that the new system is meant to facilitate? I think you might benefit from reviewing what you are trying to achieve, including the content of whatever data sources there are (questions, answer options, etc) and that will start to inform the database and system design process.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Amber-Rose avatar image Amber-Rose commented ·
Beneath is an image of how the database looks already, by using this, could you demonstrate how we would be able to make the database recognise which answers the test taker has answered wrong or right? I can explain the table in more detail if required! Thanks! :) http://www.print4tomorrow.co.uk/assets/ExamQuestion_dbImage.jpg
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.