Best data structure for 2 linked apps

Hello, newbie here :slight_smile:

I am working on 2 apps for my restaurant, but i am not sure how to efficiently structure the data. I have :

  • Inventory : listing hundreds of ingredients (price, quantity etc…)
  • Recipe book : listing dozens of recipes, each containing dozens of ingredients from the Inventory

For the Inventory, i think the data can come from a single large Google worksheet.
For the Recipe book, I am not sure. Should i go with : one worksheet to index all the recipes listing, then one worksheet per detailed recipe ?

How to handle that many worksheet ? I wonder about the loading speed… because each recipe will have a lot of data : multiple ingredients, weight, inventory units, converted unit, yields, adjusted prices, 3 different profit & margin calculation methods, etc…

Is there a more efficient data structure ? such as MySQL database (with which i am not familiar with) ?

Does someone have a similar example ?

Using two tables in one app is a good approach. For example if you have ingredient’s prices in inventory table, you can calculate recipe’s total price with a virtual column so if the ingredient’s price changes, it will update the recipe’s price as well. This is what I have used with two different restaurant apps.

1 Like

Thanks for your reply.
What about DB ? Whats the benefit over regular tablesheets ?

SQL is not needed… spreadsheet is just fine.
You actually need 3 tables for your app… Inventory, Receipts and Incredients.
#1 - Receipt is a parent table where the Incredients are child records
#2 - Inventory is a parent as well where the Inredients are childs as well.

1 Like

Ok thanks… I am still documenting myself as i am not familiar with the topic.

One important detail : i need some of my recipes to become ingredients, so i can reuse them inside other recipes. For example i have a “tomato sauce” recipe, made with ingredients “tomatoes, onions, garlic, whatever”. And then i make another “lasagna” recipe, made with previous “tomato sauce” and other stuffs like meat and fillings. Can this parent-child relation be done in a dynamic way in Appsheet (i.e when i update my tomato recipe, i need the lasagna to be updated as well )?

Yes you can do that if you add an extra Ref field to your Recipe table because you can read records from the same table.