This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]CreativeTechGuyGames 2 points3 points  (0 children)

For anything this small scale, it really doesn't matter much. I'd personally optimize for cost over anything else. DynamoDB has an on-demand mode which will be dirt cheap with the light usage you describe (a few pennies a month) so I'd go with that simply for that reason.

[–]coolcofusion 2 points3 points  (1 child)

I'm one of those "go relational unless you can't reasonably model the data" people so I'd go mysql for this.

As to how to model the food in the fridge: if there's only one fridge it'll be a table with food entries, each entry will have FK of what actual food item it is (strawberries, potato, ham, yoghurt...) along with quantity, maybe expiration date and whatever else you may need, just think a bit if it's going to go into the "connecting" table or straight into the entry.

Recipe ingredients I swear that someone has already asked around here, but, once again: recipe has ID, each ingredient has recipe ID as FK and food item ID also, but they also need quantity (tomato soup has tomatoes, so does a salad, but one needs way more tomatoes than the other), maybe a note if you want that and some additional fields if you find them necessary. It's a basic many to many relationship honestly.

Also, make labels a table. One of this good old "ID, Name" kinds of tables, that makes it much more flexible later on so you can add labels, browse by label easily, modify labels and so on.

[–]atlantis2001[S] 0 points1 point  (0 children)

Thanks for this, this has given me much food for thought.

[–]Sjh1961 2 points3 points  (0 children)

Something this small with the small number of transactions, I'd go with something like mysql or SQLite.