Solved

Create survey project

Posted on 2012-03-14
7
408 Views
Last Modified: 2012-06-27
Hello experts,

I have project of survey containing 1000 questions. 25 questions per page. I want store the survey in database at last page. So how can I maintain the values since I need to store the value only after last page. Which strategy is better like Session, cache, querystring OR any else?

OR Put your better ideas
0
Comment
Question by:sonawanekiran
  • 3
  • 2
  • 2
7 Comments
 
LVL 6

Accepted Solution

by:
kswathi earned 250 total points
ID: 37723481
I think the better idea is to store all the survey values  in a temporary table & when he finishes the last page you can insert then in your original table or you can save it in session object.

Hope it helps.
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 37724397
I would store it question by question, then periodically in the database run a query to delete any questionnaires that were not finished completely.

How many questions are you actually presenting to the user in total, 25 out of 1000?

How are you storing the 1000 question you have now?
0
 
LVL 17

Author Comment

by:sonawanekiran
ID: 37724410
Thanks for you answers. I have tables for question and their options. I don't want to store in database periodically. We are showing all 1000 questions, 25 questions per page. I want to store in database when the user hits button "Complete Survey" which is at last page of survey. I can do this with temporary tables as @kswathi said. We can also do with session, cache objects. Whats the better idea? If I use session object and 1000 users doing the survey then is it feasible solutions to create 1000 session or cache objects for users. That is what I mean?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 25

Assisted Solution

by:Rouchie
Rouchie earned 250 total points
ID: 37724427
1000 is a HUGE amount of questions.  I feel sorry for your users...!

Session/Cookies/Cache are no good because the object will be far too big with 1000 questions.   Therefore, use the database and create a table to hold the questions in progress.  So at the end of each page save (and I'm guessing your database structure) the userID, surveyID, questionIDs and answerIDs.
At the very end, copy all these into the proper database table to hold the answers and delete from the temporary table.

Note that you will also need some logic to check for abandoned surveys periodically.
0
 
LVL 17

Author Comment

by:sonawanekiran
ID: 37724454
Me too feel so sorry for end users but I couldn't help them :). Looks like you both guys recommend for temporary tables. Lets see what other experts suggest. Thanks!!!
0
 
LVL 6

Expert Comment

by:kswathi
ID: 37728190
hi,

For the survey project are you using any wizard control to load the pages & questions appear??

if you are using a wizard control then you can create a data table and add values for each next page  & in last page you can commit to db using table valued parameters.
Hope it helps.
0
 
LVL 17

Author Closing Comment

by:sonawanekiran
ID: 37728237
Thanks!!!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question