@petter Hi Petter! i bought the book today and skimmed through it, and it has some interesting topics in it! Great material for the community!
I have a 2 questions about the data structuring section, one about the DB structure and another about the ''Search Data Types" @brian4 also mentioned it before in this post.
- Data structure:
You are using a bidirectional relation, but it seems that when doing a LOOKUP, bubble gets ALL the data from the relation, causing the query to load lots of data. My approach would be to decouple them and only relate the data to the company. When you need to search for thecurrent company data, you just do
search for data WHERE company = this company
- Search data types
let’s use a totally hypotetical scenario: A car races website with info of cars and their races (lets suppose each car has only 1 race). My client needs to show certain data in a list (RG).
having the following data structure (Race and car_data are related to car but it’s not bidirectional, if so, if i want only cars, each car would search for all the data inside the related thing)
With the ‘search data type’ you are saying A) to unify the query fields in the main table, or B) to create a NEW table with duplicated fields (that get updated via a backend trigger)
If B is the answer:
- how would you create those backend triggers, would i have 1 workflow per field? (when car name changes, when introductory name changes, when race name changes, etc)
- How is that item related to its original item?, for example if i want to click on the record to expand all it’s car details (similar as first question, if i add a relation, it brings all the data of the element in the query)
Sorry if it’s too long,
Thank you again for the great book!