php - DataBase Data interity with four tables -


i have 4 tables (products, brands, colors , colorproducts) - product has 1 brand - color has 1 brand - colorproduct has 1 product , 1 color

the problem see colorproduct references color , product , both of them reference brand. happens if product , color referenced same colorproduct reference 2 different brands?

i suppose database bad don't know how fix it. use doctrine 2 orm , have read in documentation use of composite primary keys should avoided if possible. see solution problem?

thank you

it seems me brand having color unnecessary.

it gives 2 choices, store brand in product, or store brand colorproduct.

i think make sense store brand in product , solve issue altogether, color entirely irrelevant brand, associating brand colorproduct doesn't make sense.


Comments

Popular posts from this blog

Unable to open serial port using Putty to bluetooth device on windows 7 64 bit -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -