I want to make a database of recipes that I like, but I'm having trouble designing it. I want to have at least two tables:
What would be a way to associate a the two tables together? Would I need a third table that would store the several relationships from a recipe to multiple ingredients?
As you can probably tell, I'm relatively new to this stuff, just trying to figure out the right way to do it on the first try.
Thanks!
Recipe FormClick on Access' “Create” tab and then click on the “More Forms” drop-down in the Forms section. Select “Form Wizard” and an input box will pop up. Click on the drop-down box and select “T002 – Recipes.” Now click on the “>>” and all of the fields in our recipes table will be included on our form.
Here is a link to a pretty advanced one:
http://www.databaseanswers.org/data_models/recipes/index.htm
but if you really want to code it yourself I would go with a third relational table.
cheers, Mike
Does one recipe have many ingredients or many recipe's have many ingredients
I'd expect it will be the latter to allow you to find recipe's by ingredient.
So you will need an intermediate table to break the many to many relationship into two one to many relationships.
Recipe(RecipeID, etc...) Ingredients(IngredientID, etc....) RecipeIngredients(RecipeID, IngredientID, etc..)
Then in RecipeIngredients
I would put information such as quantities of that ingredient for that recipe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With