H
helpneeded
Hi,
I have 3 tables in database :
- ORDER
o OrderID
o OrderTYPE : A, B, M
- DETAILEDORDER
o DetOrderID
o OrderID
o ProductID
- PRODUCT
o ProductID
o ProductTYPE : A, B
o ...
Data integrity is on and relationships look like:
1-many between table ORDER and table DETAILEDORDER
1-many between table PRODUCT and table DETAILEDORDER
I need to achieve the following:
- ORDER of type A: has to be composed of products of type A only
- ORDER of type B: has to be composed of products of type B only
- ORDER of type M: ca be composed with either products (type A or B)
Is this possible through referential integrity? If not, is there any other
way I can achieve this?
Many thanks for your help,
Lionel
I have 3 tables in database :
- ORDER
o OrderID
o OrderTYPE : A, B, M
- DETAILEDORDER
o DetOrderID
o OrderID
o ProductID
- PRODUCT
o ProductID
o ProductTYPE : A, B
o ...
Data integrity is on and relationships look like:
1-many between table ORDER and table DETAILEDORDER
1-many between table PRODUCT and table DETAILEDORDER
I need to achieve the following:
- ORDER of type A: has to be composed of products of type A only
- ORDER of type B: has to be composed of products of type B only
- ORDER of type M: ca be composed with either products (type A or B)
Is this possible through referential integrity? If not, is there any other
way I can achieve this?
Many thanks for your help,
Lionel