Designing a survey builder with a good data structure?

104 Views Asked by At

for my current project, I'm building a survey builder from scratch (some of the requirements are very unique). I'm having quite a hard time with the data model since it seems overly normalized to me. I'd love some input on it (since I'm not the most experienced programmer).

The situation:

Most of the question types stand by themselves and don't have any relation to surrounding questions (e. g. "How do you like the weather?" - "Fine"). Other questions need a module that relates them with their surrounding questions (e. g. Likert scale questions -- How satisfied are you with: a.) your school? your workplace?).

Currently, my solution is to put every question in a module. This results in a lot of modules with just one question in them.

Here is a sketch explaining the problem:

Here is a sketch explaining the problem.

The normalized data structure looks like this (I'm using SQL):

enter image description here

1

There are 1 best solutions below

1
Randy On

looks ok. you will also need a place for the actual responders, and another for the actual responses those responders give to the questions.