MySQL Double many-to-many on an Entity

Viewed 498

I have a project where I have Products and SKU's. Each Product has one or many SKU's.

I also have Shops that can have many to many Products, So a Product can belong to multiple Shops and a Shop can have multiple Products.

To finish, each Shop can choose which SKU's they want for which Products. So I as a Shop can choose to sell the Tshirt White, which may have (XS,S,M,L) and I can choose (XS,S) as SKU's I want for my Shop.

Currently

As you can see A Shop is connected to the Products, and to the SKU's. But I have a feeling there's something wrong

My shop_skus and shop_products are not connected, So there can be a mismatch between the products a shop has, and the sku's..

How would I go about fixing that?

Thank you for your time!

enter image description here

2 Answers
Related