Do you connect data types to their grandparents with list fields?

When you have 4 tables like this:
Parent
Child
Grandchild
Great Grandchild

Do you tend to put a List of Great Grandchildren on the Parent and Child? It makes the workflow take longer when creating the great grandchildren and it makes the database busier, but it makes searches and conditions that much simpler to create and understand.

Just curious how other people do it. Thanks!

1 Like

It seems that although itā€™s not considered best practice to duplicate data in a database, people are doing things like this because of Bubbleā€™s speed issues:

Iā€™m still not sure if the same logic would apply to my ā€˜listā€™ idea, but it seems to make sense. Please weigh in if Iā€™m wrong, but for now, I think Iā€™ll go for it. Cheers, Phil

1 Like

Not necessarily speed but also building cleaner, easy to understand workflows

2 Likes

Since my initial post, weā€™ve more judiciously picked where we duplicate the FK fields in grandparent -> child tables. Basically, now there needs to be a good reason for us to do it. For example, we have a few tables that are 3 levels deep, and which render data to the User. For those, weā€™ve included the grandparent FK in the child tables, because we want the UI to be performant. Everywhere else, we take the performance hit.

2 Likes

Interesting. Why are you willing to take the performance hit? Because duplicating fields has bigger downsides?

1 Like

Became too much to maintain and ensure that the FK and the FK$unique_id fields were always filled out every time a new record was created.

2 Likes