data model for online surveys

Results 1 to 3 of 3

Thread: data model for online surveys

  1. #1
    Join Date
    Dec 1969

    Default data model for online surveys

    &nbsp;<BR>Hi, <BR>I&#039;m looking for tips, links & suggestions. Would appreciate any info.<BR><BR>...developing an online survey using ASP and a SQL database. I don&#039;t have any problems connecting to the database or writing code... but I&#039;ve never done a survey before.<BR><BR>My question ... how to organize the data in the tables?<BR><BR>Should each user&#039;s answers be stored in a single row, or should the answers for each question have it&#039;s own table?<BR><BR>(For example, the survey will have 10-20 questions, and the ASP code will show the users the questions one at a time, and the user will click "next" after each question, at which point the data will be sent to the database, and the user will be directed to the next page. )<BR><BR>So, I could have the table T_survey_answers with the columns<BR>ID, member_id, question_1_answer, question_2_answer, question_3_answer, question_n_answer, ... <BR><BR>Or should I have the table T_survey_q1_answers with the columns<BR>ID, member_id, question_1_answer ... and the table T_survey_q2_answers with the columns<BR>ID, member_id, question_2_answer...etc<BR><BR>Or is there another way to approach this?<BR><BR>Addional info:<BR>This survey will be run on two websites with about 2,000 expected surveys completed on each website.<BR><BR>About half of the questions will have an "Other" / "Comments" textarea option, so I&#039;m thinking that&#039;s going to take up space. DB Space isn&#039;t a huge issue, though. Was thinking could have the first table structure, and have a second table just for comments... <BR>T_comments<BR>ID, member_id, question_id, comment<BR><BR>...this would only contain non null entries.<BR><BR><BR>Also, are there any particular advantages/disadvantages either in storage or ease of development to the following? <BR>... Storing checkbox results (multi-part answers... like 1,3,4,7) in one field as "1,3,4,7" versus...say, storing them in one table like T_q4 with fields:<BR>ID, member_id, answer ...and the data looks like:<BR>78 4539 1<BR>79 4539 3<BR>80 4539 4<BR>81 4539 7<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: data model for online surveys

    It may not be the best way to do it but I would probably use the following structure:<BR><BR>Questions. nQuestionID, cQuestion<BR>Members. nMemberID, cName, etc...<BR>Answers. nQuestionID, nMemberID, cAnswer<BR><BR>With the nQuestionID and nMemberID as Primary Keys.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default here is an example

    I was lookin around for some ideas for a similiar project. Here is a link to get you started... You might be able to open the Access database examples and get an idea on the structure.<BR><BR><BR><BR>Hope this helps. I would seperate the questions and answers into their own table and use another table to link them together.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts