Subject | Re: [firebird-support] Re: assistance with my business rule consistency logic |
---|---|
Author | Helen Borrie |
Post date | 2005-05-10T08:34:56Z |
At 06:57 AM 10/05/2005 +0000, you wrote:
TableC. Do your business rules allow records to exist in C that have links
to A but not to B (or vice versa), or rows in B that are not linked to A?
./heLen
>Thank you for your suggestion Bogdan,Adam, I don't understand why you have keys to both TableA and TableB in
>
>Table C is (unfortunately) absolutely needed. It is one of the most
>used tables in the system. For the example, I stripped all the data
>fields that do not relate to tablea or table b out of the table
>because they may confuse people.
>
>The only field in the list that is optional is TableC.TableB_ID
>because it can be computed by a lookup to TableB based on the
>StartDate being inside the date range of TableB. (Maybe that is not
>clear in my example). In fact I can see some confusion there.
>
>This may make more sense.
>
>TableA
>(
>ID,
>Name
>)
>
>TableB
>(
>ID,
>TableA_ID,
>StartDate,
>EndDate
>)
>
>TableC
>(
>ID,
>Date,
>TableA_ID,
>TableB_ID <-- calculated by a trigger
>)
TableC. Do your business rules allow records to exist in C that have links
to A but not to B (or vice versa), or rows in B that are not linked to A?
./heLen