Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-25-2005, 06:07 AM storing survey Q&As
Junior Talker

Posts: 1
Trades: 0
Hi everybody. I am new here.


I am trying to find the best way to store survey questions and results in my website using MySQL - or anyother way. What I have is a few differing survey forms which can differ widely in both number of questions, format of questions, question types, etc. People can also submit in surveys that they want other people to complete. This submitting of unknown surveys and there formats by other people is what has stumped me.

The way I am thinking of approaching this is to have a general table that stores survey questions. This table would be set with a large number of QuestionNo colums to cater for those surveys submitted with a lot of questions. A second table would store the survey answers and references the first table that stores the questions. I have included a diagram below as an example.



Table 1 Survey Questions

SurveyID | Question1 | Question2 | Question3 | Question4 | Question5
----------------------------------------------------------------------------------------------------
65406606 | Your age? | Gender? | ......
36540459 | Did you drive to work? | Do you own a car? | ..........



Table 2 Survey Answers - References Table1

SurveyID | SurveyNo | Answer1 | Answer2 | Answer3 | ....
----------------------------------------------------------------------------------------------------
65406606 | 00000001 | 34 | Female | ........
65406606 | 00000002 | 13 | Male | ........
36540459 | 00000001 | No | Yes | ....



The reason I chose MySQL is that as a database it would be extremly easy to query results and make groupings on individual or group of questions/answers. But the problem with this idea is that the table would need to be created with a lot of columns. Or I could just create the table and if a survey question form is submitted that has more questions than I have columns then I could alter my table structure. But this would involve a lot of work later down the road if many survey question forms are submitted.


Another way I have come up with is to just store the surveys and answers into the DB as a file. I did not like this because I would then not be able to query the results and extract relevant and vital information.


Any help would be muchly appreciated and sorry for the long read
Carl2k is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-04-2005, 01:56 PM
Extreme Talker

Posts: 172
Location: Milwaukee, WI
Trades: 0
I think you should create different tables for the different types of surveys. Otherwise when you scan the data it'll look totally absurd. I mean look at the demonstration under gender, I read it without looking at the survey no and it appears male female no. I mean the no came on my face till i realized its' some other surveys answers that I was looking at.
shashank_hi is offline
Reply With Quote
View Public Profile Visit shashank_hi's homepage!
 
Reply     « Reply to storing survey Q&As
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.55285 seconds with 12 queries