Fun recipe ERD paradox

Hey guys, I’m working on creating a recipe app.

The one issue I’m having is understanding the data design.

Since a recipe’s (say tacos) ingredients can either be a product (salt) or a portion of another recipe (a salsa recipe for instance)

I am having a difficult deciding how to structure this. I created a lucid chart just a basic one to illustrate my thoughts for the moment. I’m figuring to have a yes/no column and a conditional show on two other columns so the ingredient can only be one or the other.

Is this a crazy way to think about this?

I’d just present both fields. If one becomes non-blank, hide the other.

2 Likes

Cool @Steve I guess my main question is how to avoid database issues with this. Would this adjustment work to the ERD or would it cause problems due to the looping. Essentially I’m trying to figure a way to use instances of a recipe as ingredients in other recipes. Just not sure on the conceptual relationships between data types

Rows of a table can reference other rows of the same table, or even themselves. AppSheet shouldn’t have a problem with it.

2 Likes

wow ok very cool. It’s funny I’ve always been afraid since I read some stuff while learning file maker about looping being a big no no LOL

Thanks as always @Steve !

Loops (or “cycles”) can be a problem in AppSheet, but I wouldn’t expect it to be in this case.

2 Likes

Hi, Did you find the way to do it? I´m working on the similar project but I don’t where to start!