Re: HELP: Referential integrity or NOT ?

From: GLucas4189 <glucas4189_at_aol.com>
Date: 1 Nov 1998 19:49:13 GMT
Message-ID: <19981101144913.26800.00002160_at_ng44.aol.com>


Boban

This does seem a strange data model in that there the valid_date_from forms [Quoted] part of the primary key.. Why is this so ? Is this because a 2nd customer record may be re-opened at some point, after one was closed. If this is the case then perhaps more complexity will be needed in querying invoice lines, because of this invoice date, cust.valid_date, valid_date_to relationship. You would have to start handling distinct rows in the customer table....

As I understand it your objection is on the basis that the user may manually go back and change the dates when the customer was valid..If one was to introduce a business constraint to the effect that it would not be possible to issue invoices to customers who are no longer valid, that would sort out the integrity. But if a customer was made invalid, and then opened again.. can you still invoice in the original period !?

It seems a bit crazy to me.. I agree. But I don't think referential integrity is necessarily the answer.. I think some analysis/questions needs to be asked about what a valid customer period actually means..and it's effect on being able to invoice them..

Good Luck ! I'm sure your experience is not worthless !

Graham Received on Sun Nov 01 1998 - 20:49:13 CET

Original text of this message