- The first step is to understand the design of the data, that is, how the data room is stored in the database.
- Let's take a look at the simplest form of a questionnaire.
- You can see that the approximate structure is: "Title: Caption Description of title content." Title: Topic number, topic content. Options: Option type, option number, option content. Submit: Submit button. The elements within the "" are stored in the database.
- Think about it: can you store a questionnaire? This should be possible, but a table should not be able to store only a single questionnaire, otherwise it would be too wasteful.
- What should the database be designed for:
- First: The overall questionnaire basic information should have:
The number of the questionnaire (we send the questionnaire to others through the link to fill out the words, to uniquely identify this is the questionnaire we sent to friends, in case the wrong place to fill in),
The questionnaire title,
The description of the questionnaire (say what the meaning of the questionnaire is, why the research services, etc., say thank you again),
The person who created the questionnaire (i.e. the user),
When the questionnaire was created,
Status of the questionnaire (if I published the questionnaire found that there is inappropriate, I can choose to turn the questionnaire into a suspended state, to modify it)
- The next level of a questionnaire is the problem.
- So you need to store the problem:
Number of questions
The questionnaire process-the edited questionnaire (stored in the database) is displayed in the browser