Forum Academy Marketplace Showcase Pricing Features

Help Setting up Survey App Database

I am looking for some help on setting up the database for a survey type app I’m building. I’m converting this from an Access database and having some trouble switching from SQL to a Bubble schema.

App Summary

In this application, there are several Categories, each with its own list of questions. A user would fill out a survey for only one Category at a time. In other words, when the user starts a survey, they select the category, and only the questions related to that category would be shown.

The questions all have multiple choice answers, either Y/N or a different list of options. Each question can have an optional related sub-question, for example; if question 1 is answered No, then question 1a would ask for more detail about Question 1.

Also, users create comments that should be tied to a question.

I’m not sure where to start with my data types, and if I should set questions as a list of things, or each question should be its own thing. And then how do I generate the survey and relate the questions to the answers?

@GS500 One approach can be 5 data types - Categories, Questions, Sub-Questions, Comments and User where:

  • Categories type has a field for list of Questions
  • Questions type has a field for list of Sub-Questions
  • Comments have a field for User or you can use built-in Created By field as well
  • Questions, Sub-Questions and User have a field for list of Comments

Interesting topic.

I don’t want to introduce any confusion but I want to give a example about what I was thinking.

  • Question has a related field for Category
  • Subquestion has a related field for Question
  • Comments has a related field for user and question or subquestion.

I now do wonder when to choose for a related field (list of values), or a related field (single value) or when to use both and when? This from a functional and performance perspective.

Thanks and good luck to @GS500

So like this?

Questions (List of type Question)

Question Number (for ordering)
Question Title
ResponseOption (see below)
Sub-Questions( List of type Sub-Question)
Comment (List of type Comments)

Sub-Question (This would have mostly the same fields as Question)
Question Number
Question Title
Comment (List of type Comments)

Created By

Then I need to store the possible answers to each question. Y,N,NA on Questions and various other responses on Sub-Questions. So I should probably create another type called Responses?

ResponseOption (List of Texts)

Then, I think I would need a data type to store completed surveys right? How does this look?

Answer(List of Texts) Or, would the Answer field go under the Question and Sub-Question Type?
Created Date



@GS500 Where you able to finally design this in bubble? If yes can you please share what worked for you at the end. I am trying to design similar app.