Data Structure Help: Simple Budget Tracking App

I’m trying to figure out how to structure this data for a very simple budget tracking app. Was hoping someone here could give suggestions as I’m still trying to wrap my head around data types and how to use them in the most effective and efficient way.

The goals:

  1. Allow users to create their own “Budgets” (Example: Groceries, Gas, Restaurants, etc)
  2. Each budget will have (a) Total Budget Allowed, and (b) what I’m referring to as “Entries” which are transactions that they will log to each budget which will add up in a total amount that they can then compare against the Total Budget Allowed

Any guidance would be appreciated.

1 Like

Hi @dustinstout this is my suggestion

  1. Create an option set called Category that u will use as categories for the different budget expenditures. Dont worry about the many different categories now. Just two is enough… so let’s say Groceries & Bill’s for now.

  2. Create a Datatype called budget

  3. Create a DataField NAME and choose text as the type of data

  4. Create another called Category and choose the Category option set as the type of data now.

  5. Create another called amount and choose a number/integer as the datatype

  6. Create Quantity and choose number as the datatype again

  7. Create Total Amount. Again choose number as the datatype

  8. Create another called Description/ Note, choosing text as the datatype

What do you mean by Total Budget Allowed? Can you explain further?

Hey @dustinstout

Seems like you’re making an awesome app! There’s a lot of ways to structure your database. The information you provided is a bit limited so we won’t be able to provide the most optimized schema

But for starters, with your use case, you could settle with having a budget datatype with fields like:

  • budget name
  • total budget allowed

If you think the “entries” will exceed 100 things, you could create a new entries data type instead of making it as a list of entries in budget.

The entries data type could have these fields:

  • transaction date (although you could simply use creation date for this)
  • amount
  • status
  • budget

To search for entries of a budget, you can simply search for entries where budget = budget

Again, there’s a lot of ways to go about this. You could also do @gabrielamanfogyimahh’s example, no one can be wrong here. It’s simply a matter of which schema is more optimized for a specific use case and at scale :smiley:

I’d suggest you try checking out @jj11’s upcoming database course. It’s arguably the best upcoming database course out there.

P.S. Thanks again @jj11 for the holiday gift haha!