# More efficient way to store Data?

**URL:** <https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045>\
**Category:** Questions about Thunkable X\
**Created:** [January 1, 2021, 7:07pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045 "2021-01-01T19:07:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Sigge](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/christian_sigge/32/27756_2.png) [@Christian\_Sigge](https://community.thunkable.com/u/Christian_Sigge)\
**Post date:** [January 1, 2021, 7:07pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/1 "2021-01-01T19:07:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [January 1, 2021, 7:21pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/2 "2021-01-01T19:21:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 1, 2021, 7:37pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/3 "2021-01-01T19:37:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Christian\_Sigge](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/christian_sigge/32/27756_2.png) [@Christian\_Sigge](https://community.thunkable.com/u/Christian_Sigge)\
**Post date:** [January 2, 2021, 5:08am UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/4 "2021-01-02T05:08:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [January 2, 2021, 9:06am UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/5 "2021-01-02T09:06:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [January 2, 2021, 2:34pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/6 "2021-01-02T14:34:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [January 2, 2021, 2:47pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/7 "2021-01-02T14:47:33Z")

</div>

@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).

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/f/2ff191591cb0063367720f12c61ca9beb018184e.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 2, 2021, 2:54pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/8 "2021-01-02T14:54:25Z")

</div>

Nested lists of objects are great!

[https://x.thunkable.com/projectPage/5e7e5923b1150a168e553780](https://x.thunkable.com/projectPage/5e7e5923b1150a168e553780)

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

---

<div class="post-metadata">

**Author:** ![Christian\_Sigge](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/christian_sigge/32/27756_2.png) [@Christian\_Sigge](https://community.thunkable.com/u/Christian_Sigge)\
**Post date:** [January 2, 2021, 3:29pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/9 "2021-01-02T15:29:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [January 2, 2021, 3:49pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/10 "2021-01-02T15:49:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Christian\_Sigge](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/christian_sigge/32/27756_2.png) [@Christian\_Sigge](https://community.thunkable.com/u/Christian_Sigge)\
**Post date:** [January 4, 2021, 7:28pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/11 "2021-01-04T19:28:02Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/c/acac0b5dfa793b56fea4ad5bf5af5b74301083e6.png)

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [January 4, 2021, 7:36pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/12 "2021-01-04T19:36:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:31pm UTC](https://community.thunkable.com/t/more-efficient-way-to-store-data/1042045/13 "2024-11-08T13:31:06Z")

</div>


