Database Relationships - Lists of Things

New Bubbler here…be kind…

I’m starting to program a survey app (currently exists as an Airtable app) for my company. The survey has 3 categories, and in each of those categories are 3 focus areas, and then each of those 9 focus areas has 5 questions.

In Airtable, when I create a link from the focus area that references the category, there is an automatic link that is made from the category back to the focus areas. So, if I have 3 records in the focus_area table (with each of them pointing back to the same category), there is a corresponding column in the category record that has the 3 records that align to that category.

In Bubble, I have seen that I can create a “List of Focus Areas” in my Category table, and I can create a reference to the Category table from the Focus Area table.

The one thing I’m not seeing - when I create a reference from the Focus Area to the Category, shouldn’t Bubble automatically add that Focus Area in the “List of Focus Areas” in the Category table? It’s not happening, so I assume Bubble doesn’t do that, but why? How do you all handle this?

Thanks so much!


In terms of data, Bubble doesn’t create links automatically. Your example sums it up nicely. A has a list of Bs and B has an A as backlink. When you create an instance of B in the list of an instance of A, it doesn’t create a back link at B to the A automatically.

It handles all the foreign_key stuff under the hood of course. That you don’t have to worry about. If you have a field of type another data type, I find this easier to read and reason about.

If you really need a back link, as you said, you should do it manually while creating a Focus Area and set the category of it to the parent. This totally depends on if you need to access to the parent in some way. Usually data starts from top-down though. So, technically, you have the parent at hand (like a Category in your case) and then you have access to the list of things it has as children (List of Focus Areas) to do whatever you want (analyze, read, print, count, access parent of Focus Area).

Another benefit to that I see is one-to-many relationships. In Bubble, you can move some thing around easily. For example, you can move one Focus Area from one Category to another one easily, so you don’t want to deal with backlinks.

This rant is totally subjective opinion of mine :slight_smile:

Thank you so much for your response - I’m going to embrace the top down “List of Things” to build the app - fingers crossed!