Mysql database design issue -


I know I'm doing this wrong, so I'm hoping someone can help me here. It's a bit complicated, so I'll try to explain it as much as I can.

I have a table of products with an ID and title. A product can have multiple certificates and there may be several products in the certificate. So far, these are my tables:

Products
certificate
product_x_certificate

The problem here is that I should be able to present products together. So suppose I have these products:

Towels
Club
hats - balls

On a certificate, I present towels with clubs, another evidence In the letter, I present towels with hats, and on the other, I offer cap with balls, to make it even more complicated, customers have the option for each certificate. Therefore, there can be multiple offerings in a certificate, for example, customers have an option between balls and cap or towels and clubs on certificate A.

I tried to create a table named product_x_product and field A_ID, B_ID, certificate, but I am running in all types

thanks

I think you need most of the tables you need. * You can have multiple certificate IDs and multiple product IDs, in the product_x_Certificate *, which means that you can set up one like this:

  Product_x_Certificate table certificate id - Product ID 45 4 45 7 46 8 46 9 47 10   

In this way you have one or several products per certificate that satisfies your first requirement. For the same certificate with many groups of products - why not just create a new Certificate ID? Then if you need to create them conceptually group then you can create certificate group and certificate_xartprograph group table like:

  certificate group table certificategroupIID name1 items hitting certificate_x_CertificateGroup table certificate group id Certificate ID 1 461 47   

Is this help?

Comments