Solved

Create survey project

Posted on 2012-03-14
7
400 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now