By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,045 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,045 IT Pros & Developers. It's quick & easy.

Random check

P: 171
Hi All

I want to develop an exam database in access. Please advise how should i create the table structure? is it ok to have a single table with all the questions and answers (answers are like multiple choice) or should i keep the questions and answers in two different tables?
And the main request is I need a code which can check the questions in a random basis every time when we want to give an exam to the students. After collecting the questions and relevant multiple choice answers that need to be displayed in a form.
Hope i can expect a detailed reply from the experts

Thank you all for the help
Feb 14 '09 #1
Share this Question
Share on Google+
4 Replies

P: 2
thanks for the question. I also planning to do something like this. I also need a script. Please help?
Feb 14 '09 #2

Expert 100+
P: 489
You could arrange your table either way. As one table you could arrange it something like

Table Questions

QuestionID...........Autonumber Primary Key (PK)
CorrectAns...........Number (To indicate which answer is correct)

(You only have to enter the question once but you would be limiting the available answers to each question to the ammount of answer fields you create in the table)

Or This

Table Questions

AnswerID ..............Autonumber (PK)
QuestionNum.........Number (The question number)
CorrectAns............Boolean (Yes/No) Is this the correct answer for this number

(This way would allow you to expand the number of available answers to each question but you would have to enter the question text and number for each possible answer)

Or with multiple Tabels you could have it like this

Table Questions

QuestionID...........Autonumber PK

Table Answers

AnswerID.............Autonumber PK
QuestionID...........Foren Key (FK) from Question Table
CorrectAns...........Boolean (Yes/No)

(This way you only have to enter the answer once and are not limited to the number of possible answers for each questons.)

I'm sure that any of these options would work for you but only the last one would be a technicaly correct table structure. See this post on proper database structure
Feb 14 '09 #3

P: 171
Still waiting for the script to perform random check. pls help. Thank you
Feb 15 '09 #4

Expert Mod 2.5K+
P: 2,545
We can point you in the right direction as Don has done - the rest is up to you. Please do not expect us to do your work for you.

Please read our posting guidelines, and in particular our guidance on homework questions.

Feb 15 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.