Survey DB Design. No user answers, only questions

Posted on

Question :

The task is to SQL a bunch of surveys in order for the researchers to have examples for creating new questionnaires in the future (and insert those questionnaires into DB). So no information about the users, just the questions and answer options.

The questions are very different but there are some types of answer options that work with many questions from many surveys`(like ‘Do you have a cat?’ – ‘Y/N’, ‘Have you ever eaten oysters?’ – ‘yes/no’; or ‘Scale from 1(very bad) to 5 (very good) how you are experienced in pumpkin soup cooking’ — ‘1-5’, ‘Scale from 1(not important) to 5 (very important) how it is important for you to have at least 1 pint of beer on St. Patrick’s Day’ — ‘1-5’)

Im concerned about the link between ‘SURVEY_QUESTIONS’ and ‘ANSWERS_OPTION’. Is it enough to put only Question_typeID as PK in SURVEY_QUESTIONS?
And I would appreciate any feedback on my db schema
enter image description here

Answer :

Your relationship looks good.

However, I know you said no answers for now. But, I suspect at some point you’ll have other tables for that. Maybe a participant table, followed by one surveys they took, questions they were given, and the answers they provided.

Leave a Reply

Your email address will not be published. Required fields are marked *