|
Hello
i have a database where i have some types of pizza, and their composition(stored in Reteta, in numeComponenta). e.g.: sauce,mayonnaise,mushrooms, etc, for each pizza.
And i also have an Incompatibilities table, where i have id1 and id2, and i wanna, for example if id1=3 and id2=6, the components 3 and 6 to be incompaible. how can i do this?
so, for example i have:
Componente
idComponenta NumeComponenta
1 sauce
2 mayonnaise
if in Incompatibilitati id1=1 and id2=2, sauce and mayonnaise are incompatible, and i cannot insert them into a pizza, as composition
i have this problem just at the relationship between Incompatibilitati and Componente, other relations are ok.
Thanks!
|