Using database to store static values - good practice?

One of my developers did a fair amount of the following:

They’d create a data type like this, with just 2 records in it:


And then they’d do a search for one of those records whenever they needed to assign a ‘Type’:

It seems to me it would be a lot simpler to get rid of this data type, just make ‘Type’ a text field, and assign the ‘Available To Give’ or ‘Request’ directly to that field rather than doing a search every time, which presumably takes slightly more time and is also just more confusing when working in the backend and also when debugging.

Is there any reason I shouldn’t make this change to my simpler method? Is there a benefit to doing it the database way? Thanks!

I can see why this was done, but in my experience, it’s more useful when there are many more of these static values involved so that you don’t risk misspelling the value (although this particular use case still has you typing it out for the search as per your screenshot).

The main benefit I’ve seen for this is when you have dropdowns or auto search elements that need to display a list of static options to a user. Instead of having those elements set as “static options,” they’re dynamic and pull from this static list of records instead. That way you’re safe knowing that the same values will always be saved and there’s less human error. That IS a big help but usually when you have a bigger list.

An example I’ve seen/done many times is keeping a list of Countries and States. Another is with job boards - there are usually lots of “types” involved when filling out a job form that it’s better to keep those values in the database so that if you need to modify or add, it’s easier to do it once than go hunting for it everywhere in the app.

To me, having two records only, and in the way it’s being used in your app, doesn’t provide too much benefit because you still have to type out the Name. Even if they’re being saved to offer future flexibility to change names of things… you still have to go back and change all these Search constraints to match.

Having said that, if you anticipate for there to be more Donation Types added later and these types need to be shown to front-end users in a form, then that might work more in your favor.

Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources


That’s what I figured. Thanks Gaby!

Hi @romanmg!

Thanks for answering this, it makes lots of sense.

In my app, I have used “static data” myself to be pulled out under conditions. However, when I deploy the app, the table is cleaned… Should I create these kind of data once app is live or is there a way to keep them from development to production ?

Thanks for your help.

Happy… no-coding!!! :rofl: