473,386 Members | 1,674 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,386 software developers and data experts.

Random check

171 100+
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
4 1491
thanks for the question. I also planning to do something like this. I also need a script. Please help?
Feb 14 '09 #2
DonRayner
489 Expert 256MB
You could arrange your table either way. As one table you could arrange it something like

Table Questions

QuestionID...........Autonumber Primary Key (PK)
QuestionText
CorrectAns...........Number (To indicate which answer is correct)
Answer1Text
Answer2Text
Answer3Text
Answer4Text

(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)
QuestonText
AnswerText
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
QuestionText

Table Answers

AnswerID.............Autonumber PK
QuestionID...........Foren Key (FK) from Question Table
AnswerText
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
rajeevs
171 100+
Still waiting for the script to perform random check. pls help. Thank you
Feb 15 '09 #4
Stewart Ross
2,545 Expert Mod 2GB
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.

MODERATOR
Feb 15 '09 #5

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

Similar topics

14
by: Paul C-T | last post by:
Hi, Is there a way to repeat a set of code until a certain if statement is satisfied. If it is then to exit the loop and if not repeat the code? Say I want to write a card game application in...
4
by: Pjotr Wedersteers | last post by:
Does anyone know how one can get values from the on-chip random device on modern Intel processors using PHP ? I am using a windows (XP) based system, PHP 4.3.8 TIA Pjotr
4
by: mescaline | last post by:
hi, i'm new to C++ could anyone refer me to a good site / good examples of random numbers? in particular including: 1) the commnds to obtain normally and exponenetially distributed r...
21
by: Marc Dansereau | last post by:
Hi all I am new to this forum and to the c programming language. If I understand, the random() function in C return numbers that follow a uniform distribution U(0,1). Can somebody know how to...
3
by: tshad | last post by:
Is there a good random number/letter generator out there? I just want to be able to generate a password that has letters and or numbers about 10 characters long. Thanks, Tom
104
by: fieldfallow | last post by:
Hello all, Is there a function in the standard C library which returns a prime number which is also pseudo-random? Assuming there isn't, as it appears from the docs that I have, is there a...
4
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
26
by: Jimmy | last post by:
ill have a database with 1 table and 3 fields: ID FIRSTNAME LASTNAME (the ID field will be the auto incrementing index) there might be 10 records in the DB, there might be 10,000. i...
8
by: asdf | last post by:
I want a random number generator, the random number should be subject a uniform distribution in . Could you please give me some hints? Thanks.
20
by: jjmillertime | last post by:
I'm new so i apologize if this is in the wrong spot. I'm also new to programming in C and i've been searching for quite a while on how to create a program using C that will generate two random...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.