Forum Discussion
Relationship between two tables
so if customer orders product m123 x 3, then automatically product m123 with it standard accessories are x 3,
you need a uniquekey for each combination of product and accessory.
for example
you could take the combination of main product and accessory together that make a pack in a table and assign a unique id to each unique combination then under client you could use id that rather than the main product to join on
just depends on how far you want to go to model this data.
Hi
I can't use a combination since each accessory is unique on the customer table, while my main product is also in that column where my accessories are since the main product and accessories are "products"
- vanessafvg3 years agoCommunity Champion
the only way you can get around a many to many relationship is to create a unique combination of the products required, otherwise how will you know what other products it is referring to?
- Medmbchr3 years agoHelper IV
I didn't quite get your point, but in the meantime i created a bridge entity between the two table with a list of all unique accessories that link both table
- vanessafvg3 years agoCommunity Champion
that makes sense to do, as long as you know which products are being used in that particular order. your question was that you wanted to take the main product and then multiple the same number to the accessories with that product. so has your solution solved this issue?