All- I’m working on an application that involves a few simple many-to-one databases. In this example, let’s say Locations has a one-to-many relationship with Projects where many projects will be completed at one location.
When a location is viewed, much of the information you need to know, quickly, is based on projects at that location. For instance, at the First Avenue location, the last project, Mercury was completed on 12/12/2018.
I’m struggling with how to do this and think there are three ways:
-
Join to the Projects database anytime I’m viewing a location and search for the correct record(s) or data to display. Very simple, but slow when viewing records with many on one page
-
Set an update flag on a location anytime any of that location’s child projects are updated. Then start a workflow to search all projects for that location and update the corresponding location data. Also simple. May have issues if multiple projects are updated at the same time?
-
Update the location record at the same time the project record is updated. I’m currently doing this, but quickly running into a consistency and upkeep nightmare as complexity is added
Any thoughts? How is the Bubble community does this? Keep in mind users will have the ability to edit information in the application (i.e. Mercury is marked Completed when it actually wasn’t, and the data needs to update)
I’m leaning towards option 2 above.