I'm trying to design a products relations table structure. There is an existing
product table that has the following fields:
A product could be related to other product but also to a category or a subcategory. Or even, have the three type or just two type of relations at same time.
At the same time, a product subcategory could have a relation to other subcategory or category also to a product.
The main goal for what this is for is when a product is selected by the user, he can get suggestions to other product related to the one selected.
So whats the best table structure you can suggest to store those relations?
But I dont know if thats reliable way.
Thank you in advance!
Maybe I did not explain well. Lets say a product x is related to products in Category Y and/or also related to products in Subcategory Z. But could also be related directly to a single product. There are chances to a product have the three types of relations or only two or one of them.
And the Subcategory field of product could be have the three types of relations too.. Or none of them..