The Ultimate Guide to Bubble Performance - the new edition is out (now 210 pages!)

@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" @anon10873777 also mentioned it before in this post.

  1. Data structure:
    image
    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

  1. 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:

Sorry if it’s too long, :sweat_smile:

Thank you again for the great book!

2 Likes