Google Answers Logo
View Question
 
Q: Survey Design ( No Answer,   2 Comments )
Question  
Subject: Survey Design
Category: Computers
Asked by: cool_dude_208-ga
List Price: $20.00
Posted: 11 Oct 2004 16:51 PDT
Expires: 10 Nov 2004 15:51 PST
Question ID: 413425
I am going to do a project to develop a survey( the way students take
survey to fill out to evaluate course). The survey consists of
all types of questions like multiple choice, multi choice, open text
,yes/no questions).
Iam going to use php and mysql.
Can someone suggest me a good database design.
The structure of tables and what fields to keep in each table.
I dont want to record any ipaddress of persons taking survey.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Survey Design
From: mrd3nny-ga on 11 Oct 2004 18:00 PDT
 
This is a fairly easy table design.  You'll want a table that stores
the type of questions that can be asked, and the basic HTML code that
will do with them.  This is for the admins.  A table with the
questions and the actual HTML for each questions, ie the drop down
code, the radio button code, etc. and the actual question, and a table
which will store the answers.  If you want to have more than one
survey you'll need a table to account for that.

create table QuestionTypes
(QuestionType_ID int,
QuestionType_Desc varchar(25),
BasicHTML varchar(100))

create table Surveys
(Survey_ID int,
Survey_Desc varchar(100))

create table Survey_Questions
(Survey_ID int, /*This is only needed if you use a Survey's table*/
Question_ID int, /*This is unique per survey, this will also be the
order of the questions*/
Question_HTML varchar(500), /*This is the actual HTML that will be
displayed for the question*/
)

create table Survey_Answers
(Survey_ID int, /*This is only needed if you use a Survey's table*/
AnswerGroup_ID int /*This will tie all the answers together so that
you can group them by person.  This is important even if you don't
identify the person, so that you can do some advanced grouping such as
if they answered X for questions 2 and Y for question 3.  Without this
table that can't be done.*/
)

create table Survey_Answers_BreakDown
(AnswerGroup_ID int,
Question_ID int,
Answer varchar(1000) /*This needs to be a large field to account for
large text answers.
)

This code is Microsoft SQL Code, it should run on MySQL without to much trouble.
Subject: Re: Survey Design
From: joshfraz-ga on 12 Oct 2004 23:05 PDT
 
Hey there,

If you describe the fields that you need I will design the database
for you and post the necessary mySQL code.

Josh Fraser

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy