P
P
PyDeveloper12021-10-20 23:17:22
Database design
PyDeveloper1, 2021-10-20 23:17:22

How to link data from one SQL table?

There is 1 table with products, each product can be sold separately, or together with other well-defined products from the same table . The decision comes to mind to create a second table where for each product to indicate the id of other products with which it can be sold, but this solution looks rather cumbersome. What do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2021-10-20
@PyDeveloper1

The decision comes to mind to create a second table where for each product indicate the id of other products with which it can be sold
Comes right. This standard solution is a link table for a many-to-many relationship.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question