0

My supervisor asked to design a database by using MySQL. This database is used to store information about evaluation surveys. The survey has a lot of questions, and each question has 5 choices, the user choose the answer, and then the system evaluate the scores by the answer. Basically, my supervisor wants me to create a database that stores information about surveys, and also the results of each survey. Could anybody give me an idea how to start it?

0

I don't have any experience in this domain, but a quick Google of "open source survey software mysql" gives 874,000 results. What I recommend that you do is to download a few of these - see how they organise their database schema(s) and adopt and adapt your own schema to what's been done already. As Newton said, stand on the shoulders of giants. You could also take code if you can read the particular langauage in which it's written - (PHP, Perl, Python - whatever).

Your question is very broad and vague and probably outside of the guidelines for the forum - take the tour and also the "help us to help you" blog - both at the bottom of the page. These forums are a great resource and you will gain a lot by following the guidelines.

| improve this answer | |
0

First, think of a database (in MySQL or otherwise) as a place to store raw data. After you design that, then think about how the data needs to be processed. It may -- or may not -- be possible for SQL statements to do some, or all, of the processing.

Your specification has possibly left out some information, such as what you need to store about the users that take the survey.

So, perhaps one Database with a few Tables:

CREATE TABLE Users (
user_id INT UNSIGNED AUTO_INCREMENT,
user_name ...
etc...
PRIMARY KEY (user_id)
);

CREATE TABLE Questions (
q_id INT UNSIGNED AUTO_INCREMENT,
question VARCHAR(200) NOT NULL,
PRIMARY KEY (q_id)
);

CREATE TABLE Answers (
user_id INT UNSIGNED NOT NULL, -- for JOINing to Users
q_id INT UNSIGNED NOT NULL, -- for JOINing to Questions
answer CHAR(1) NOT NULL, -- 'a'..'e' -- assuming those are the possible answers
PRIMARY KEY(user_id, q_id)
);

Maybe that will help you get started. Suggest you take the online MySQL tutorial, too.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.