More efficient way to store Data?

Hello, im looking for some advice,
my App data structure looks like this:

  • 1 Project
  • Up to 4 Subprojects
  • each Subproject can have up to 10 categories

The Textinput input fields are all generated through cloning and the data is stored inside dynamic app variables.

If i want to save the values from these dynamic generated app variables into the local database i have to creat + 500 blocks.

Just because local db don’t allow to use dynamic input fields like the variables, my idea was also to use objects, but here aswell i cant generate dynamic objects. (Right?)

I could generate stored dynamic variables, but jow do i delete these variables i if delete the whole project?
Or shouldn’t i care about the left over Data?

1 Like

Hierarchical data like you are describing is the strength of JSON objects. You can save the entire hierarchy you are describing as a single stored or cloud variable.

1 Like

Yes. I have crapload of data in Firebase rn. A bunch of user specific lists.

Im done with airtable for now.

Json would be the way I’d go

If i don’t want to use firebase than there is no better way for me to save data?

I don’t want to use Firebase because the free service is limited, in case the Data Volume exceed the free plans limit the app is not useable anymore.
And Switching to the pay as you go plan will make pricecalculation for an app you want to publish as an paid app difficult.

1 Like

I understand the concern, I am also mindful of scaleability. With 10GB of free storage, that is 5 billion characters. That should easily yield millions of “rows”. Firebase’s free Spark account can also handle 100 concurrent user. I shudder to think how a google sheet will perform with 100 users all attempting to read and update a million row sheet.

But to you question of alternatives, you can use JSON without using firebase. Just save the object hierarchy in a stored variable. No firebase required.

2 Likes

Use air table up to 1500 cells
Use google spreadsheet up to 15 gb

@Christian_Sigge,

Now that I am at a computer, here is an example of how Thunakable JSON objects can handle your type of data (with or without firebase).

2 Likes

Nested lists of objects are great!

Oh boy. With the new data viewer this project needs an update. I know what my next project is! :wink::wink:

Can i generate these blocks dynamically through cloning or do I have to pre generate the whole structure?

You can add , modify, or delete any properties at any time. JSON is great at dynamic data structures

1 Like

I was doing some tests, but I can’t figure out how to add a new Object to the list.

In firebase it is fairly straight forward. But if you are just using app or stored thunkable variables it gets tricky updating deeply nested values (especially lists).

Check out my custom GET and SET functions to updated nested properties, they will make your code a lot easier to read, debug, and maintain.

Back to your specific question of updating a list that is deeply nested, the general approach I use (when not using firebase):
Set a temporary variable to the JSON node containing the target list
add a entry to the temporary variable list
Set the JSON node to the temporary variable.

Kind of a pain…

In firebase, you can set a stored variable to the node and simply add items to the variable.