locked
Database Design for Survey Application RRS feed

  • Question

  • I am working on an application having survey questions. What I want to do is when user start appliaction several questions from database load in to client side. in case some thing going wrong with PC while answering survey questions AND if user needs to restart the computer, On next login the survey should start from the positions where it was stopped. There is no compulsion for user to use same PC. User can use another PC to logon. There can be more than one user at a time. All the survey history for each user should stored on databse so users can review their past surveys if needed.How can design effective SQL Database to fulfill this task?
    DA
    Wednesday, March 31, 2010 1:39 PM

Answers

  • I think there is something missing. I am not suggesting to create user wise tables.  What i am suggesting is, lets say you have tables  SURVEY , USERS,QUESTIONS,ANSWERS and a JUNCTION TABLE OF ALL these (this is just an example).  In this case, the junction table stores the answer selected by a user for a survey , for a question.  What i am saying is keep a Intermediate junction table where we periodically stores the data.   Could you please post your data model here?

     

    Madhu


    MCITP, MCTS, MCDBA,MCP-- Blog : http://experiencing-sql-server-2008.blogspot.com/
    Monday, April 5, 2010 2:07 AM

All replies

  • with the given scenario what i can think of is a Intermediate table(s)  to store the data and save the data periodically   say every min to the tables automatically.  When user press the save botton move the data in to main table(s). Another method would be keeping the data in the same table with some flag saying that it is auto save or User saved.

     

    Madhu


    MCITP, MCTS, MCDBA,MCP-- Blog : http://experiencing-sql-server-2008.blogspot.com/
    Friday, April 2, 2010 7:23 AM
  • Hi Madhu,

     

    Thanks for reply. Second method doesn't work in my case. because there are not fixed number of users using same question. Any one have same question while filling survey. So to flag the question in main table doesn't work.

     

    For first suggestion, same question. It is very tough to maintain user wise tables. I have not fixed number of users. User can vary fron 500 to 5000. I can understand the mechanism to save data periodically but the question is How can i manage the history of user surveys. History also holds the questions and answer filled by user, date time and place.


    DA
    Saturday, April 3, 2010 5:32 PM
  • I think there is something missing. I am not suggesting to create user wise tables.  What i am suggesting is, lets say you have tables  SURVEY , USERS,QUESTIONS,ANSWERS and a JUNCTION TABLE OF ALL these (this is just an example).  In this case, the junction table stores the answer selected by a user for a survey , for a question.  What i am saying is keep a Intermediate junction table where we periodically stores the data.   Could you please post your data model here?

     

    Madhu


    MCITP, MCTS, MCDBA,MCP-- Blog : http://experiencing-sql-server-2008.blogspot.com/
    Monday, April 5, 2010 2:07 AM