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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

most efficient way

Status
Not open for further replies.

simplyJ

MIS
Jul 12, 2001
59
US
I am making a test system and need some suggestions on how I can store all of the questions in order to display them throughout the test.

I have a question table and a test table with a many to many relationship. Another table, testquestions, stores which questions are for each test.

When a user takes the test I want to display each question individually and then record their answers into a session.

The question is how do I store all of the question IDs so I can display the test questions.

It seems like I only have two options.

1. search for all question IDs in a test, and store them in a recordset each time. Then look throught the questions and find the newest one that hasn't been answered. (I would have to do this proccess for every question, which would tie up resources doing all of the searches "i think")if the test was fifty questions i would have 50 of the same searches

2. do one search and store it all in a session. I could then use this session and not have to search each time, but it still seems like it would use alot of resources. a fifty question test would require fifty sessions per person.


Any suggestions on the best way to do this?

 
I have been loooking on the site and cannot seem to find the example. Can you tell me where exactly to look?

Thanks
 
Sorry to bug you again, but I just wanted to ask you about this site. This site seems to just give database models. I have already made the appopriate design, I just can't figure out how to use it :). It wouldn't be hard to make my test system work, but I am just looking for the most efficient way to do it.
 
The best way to do it would be to not use sessions. You would have to go the RS route... there are ways to improve recordset performance (eg .GetRows or .GetString) maybe one of those two will help you out.

Personally, the idea of having 50 recordsets all containing the same data isn't too bad a hit... as long as these recordsets exists for <= 1 sec, no body should even notice. Then again, if your recordsets are being retained in memory for a while, that could be a different story.

hth
leo leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top