MySQL table design for a questionnaire

I am new to MySQL and have a project where I need to create a database that will store responses from an online questionnaire. Reports should be written from data. Does anyone have any hints on what field types to use? The questions will either have a "Yes No" answer or a choice of 4 options ranging from very satisfied to very dissatisfied or multiple choice. These are mostly selection questions that I'm not sure about as I will need to get a report to show the percentage of satisfied customers. I know this is probably really basic, but I don't want to be wrong.

+1


source to share


2 answers


This depends in part on the design of the survey - one or multiple pages; if a multi-page file, you store the data as the user navigates from page to page, or just at the end, etc. I think the biggest issue is whether one poll response will match one database row or whether a single survey response can be split across multiple lines. Obviously the first is the path, if at all possible.



For multiple choice questions, I would like to use INT or ENUM columns; Determining the proportion of respondents who answer in a certain way is a simple SELECT ... GROUP BY query.

+1


source


Have you explored using something like SurveyMonkey for your survey?



If that doesn't fit, there is a thread on the MySQL forum that might help: Database Design for Multiple Choice Questionnaire responses p>

+1


source







All Articles