About Data Types
A data type is where you store data that:
a user might be able to create, update, or delete (i.e., a project, a task, a company, a journal entry...) might have some sensitive information attached to it (i.e., an API key, or a bank account number) might be updated occasionally or even frequently About Option Sets
Your option sets are basically a separate little database that behaves a little differently than your data types. Option sets contain data that...
don’t typically change all that much - sometimes never (i.e., days of the week, project statuses, app permissions) you as the app developer create and maintain (users can never create or modify options) do not contain sensitive data (see below) Option sets are really handy because you don’t have to “search” your database for the option you need. You can use the “get an option” expression and then just find the option you want.
Some downsides to Option Sets:
If you make changes to them, you have to deploy your app for those changes to take effect for users. The UI of the Option Sets panel in Bubble is terrible (this will hopefully change, but no one is holding their breath). You cannot upload a CSV to an option set, or duplicate options or sets. When to use which one
Here’s how I go about this: When I’m looking at a bit of data that needs to be saved in my app, I ask myself...
By the time you get to the end of these questions, you’ll probably know what to do.
Some tricky ones
Tags and Categories - I walk through them here: States or Countries - These rarely change, so an option set makes sense, but there are a lot of them, which you have to enter manually. You could much more easily run a quick API call to populate a data type with robust state/country data instead.
Security Considerations
Your data types live on Bubble’s server, and are only downloaded to your user’s web browser if you create a search for that data and if the privacy rules you’ve set up allow the retrieval of that data. Option Sets, however, download completely to your user’s web browser every time they load a page. Literally every letter of every option of every option set is delivered to your users, constantly. For that reason, you should never have anything that’s remotely sensitive saved in an option set. That stuff goes in a Data Type.