I decided that database will be consist from the following tables:
- surveys
This table stores all the surveys, their description and their ID number - questions
In this table will be placed all the questions of each survey - answers
This table contains all answers of each questions (One question may have 1- many answers) - users_answers
In This table i will gather all the answers that user made when he answered the survey.
(after the answerer press the 'submit' - each answer will be inserted as row into this table along with user_id and answer_id from answers table)
Some other planning stuff
There are some rules i decided to place here, because they have thight inflence on database:
There are some rules i decided to place here, because they have thight inflence on database:
- Each user can answer each survey only once.
- Published surveys cannot be editable.
- all answers checked by user will be stored with it's answer id and user id in row at user_answers table.
(It means that only after user marked all the answers and pressed the 'submit button' the answers will be inserted to database)
No comments:
Post a Comment