Hello,
I am having the following situation:
* a table tblType1Deals with info on "type 1 deals". The primary key of this table is Type1id
* a table tblType2Deals with info on "type 2 deals". The primary key of this table is Type2id
* A deal can either be type 1 or type 2 (but not both), but both type 1 and type 2 deals have "subdeals". Therefore, I have a table tblSubdeals, with (among other fields) on field linking to tblType1Deals through Type1id and one field linking to tblType2Deals through Type2id
The problem is that I want to enforce somehow that a subdeal can only be part of / linked to a Type 1 deal OR a Type 2 deal, and never to both. I guess I could enforce this with some basic programming in the input forms, but this does not really seem like an elegant solution and it seems bound to cause trouble sooner or later. Anyone any suggestions as to how to solve this in the best way?
Many thanks in advance!
I am having the following situation:
* a table tblType1Deals with info on "type 1 deals". The primary key of this table is Type1id
* a table tblType2Deals with info on "type 2 deals". The primary key of this table is Type2id
* A deal can either be type 1 or type 2 (but not both), but both type 1 and type 2 deals have "subdeals". Therefore, I have a table tblSubdeals, with (among other fields) on field linking to tblType1Deals through Type1id and one field linking to tblType2Deals through Type2id
The problem is that I want to enforce somehow that a subdeal can only be part of / linked to a Type 1 deal OR a Type 2 deal, and never to both. I guess I could enforce this with some basic programming in the input forms, but this does not really seem like an elegant solution and it seems bound to cause trouble sooner or later. Anyone any suggestions as to how to solve this in the best way?
Many thanks in advance!