A
A
Anton_repr2019-10-30 07:27:28
Database design
Anton_repr, 2019-10-30 07:27:28

How to link recipe and products?

Good afternoon.
I have a problem with creating tables, namely I don't understand how to link them.
There are 2 tables - in the 1st the names of the products, in the 2nd the names of the recipes.
It is necessary to somehow link the recipe and a certain number of products. How can I do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lone Ice, 2019-10-30
@Anton_repr

Read about table relationships, in particular ManyToMany. More specifically, another table is created, say, RelationsRecipeProduct, which will contain only 2 fields - idRecipe and idProduct. Then, with the help of joins, data from 3 tables is picked up and voila!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question