A Thing (capital t) is a custom data type created by the Bubble programmer user. (What isn’t a Thing? An object that is of a non-custom (“built in”), primitive data type. These are the data types known as text, number, numeric range, date, date range, date interval, yes/no, file, image, geographic address, the special value “empty”, or arrays (lists) of such objects. Any other data type is a Thing.) There are only a few additional things to know about Things:

  1. An instance of a Thing can only be created by interaction with the database. (We cannot create a Thing in the page without interaction with the database.)

  2. A Thing can only be created, modified, or deleted by the Bubble programmer user by explicitly calling the Create/Make Changes/Delete a Thing actions. Plugins cannot perform these actions.

  3. Indeed, the Bubble database can only store and Search for Things. Any primitive data types stored in the database are stored in fields on a Thing and are stored/modified/retrieved by reference to a Thing. While a Search can be made to destructure or map the resultant Things to some component field on the Thing before returning those results to us (for example, we might do an unconstrained Search for Users:First Name), the Search itself is for Things (Users in our example) and the mapping to the text field First Name is a subsequent operation (that we might instead choose to do in the page later).

  4. There is one built-in Thing that all Bubble projects have: The User data type. Though you cannot delete this data type it is not a primitive data type, but a Thing.

  5. A Thing can have practically any number of fields on it and these fields can be scalars or lists of any data type including other Things or even a Thing of the same data type. (As a common example, our User object may have a list field of type User on it called Friends.) Note that some specific Thing can even refer to itself via a field of that same data type, which lets us model the very structure of the Universe:




Runtime view: image

End of story about Things, pretty much.

But also, I think the above shows why you should stop thinking about your database in terms of “rows”. There’s no such thing. The only thing you should care or think about with respect to your database are the Things it contains (which are simply JavaScript objects) as this is all that you can make and all that you can access.

1 Like