Solved

Create survey project

Posted on 2012-03-14
7
412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…

734 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