Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6 To create a EXAM BASED Database

Status
Not open for further replies.

k992081

Technical User
Dec 10, 2001
5
GB
I want to create a exam system where students can take exams in the format of industrial qualification exams, e.g CCNA, MCSE. Linking the Forms from VB to my Access tables is okay.

1) How do I query the database (easiest way), e.g so 10 x random questions can be generated and cant be picked again if test retaken by the same user?

If anyone would like to see my table and design etc, please let me know.

Very grateful for any help. Thanks!
 
I assume you have at least three main tables involved in the process.
[tt]
1 - Questions - In the duh Category.
2 - Users - Normalied, but also a duh category thing.
3 - AnswerLog - The trick, Foreign keys to both tables above.
[/tt]
You might have more, but they are unrelated to this problem.
Also, I'm simplifying the keys to look like single fields, you might have multi-field primary keys, but that's also not a big part of your problem.

The log needs the foreign keys UserId, QuestionId, and the data fields Answer and any thing else you want to put in, like network-source, DateTime of/to answer, etc.

Left/right joins allow you to create lists of answered/unanswered questions.

Indirection solves your randomize problem.

Use a relative random Id, when there are ten, pick a random 1 to 10, when three, pick 1 to 3. You'll have nightmares trying to make the absolute id thing work.

You want "Select (random)th unanswered question."
Not "if (random)th question is unanswered, select it."

Sorry my SQL is too rusty to include anything right now.


Wil Mead
wmead@optonline.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top