Re: The fable of DEMETRIUS, CONSTRAINTICUS, and AUTOMATICUS

From: Tony Andrews <andrewst_at_onetel.com>
Date: 20 Oct 2004 02:46:35 -0700
Message-ID: <1098265595.661594.12310_at_z14g2000cwz.googlegroups.com>


Kenneth Downs wrote:
> > Can you answer the constraint question?

> I did. But I'll try again.
<SNIP>

Actully, you didn't - and nor does your second attempt. In both cases, your response is to say that such a constraint would be stupid, and therefore you will not do it. Now, you may or not be right about that particular example; I certainly have some sympathy with what you say. In fact, with the timesheet example, what we really did was not disallow the insert but rather allow the record to be inserted with a status of "Invalid" so that it could be made "Valid" later (by the set up of the required assignment record). But this is beside the point: you could equally claim that foreign key constraints are bad, because they only allow you to use references that already exist ("sorry, you can't buy that radio, because it isn't recognised by the system at all").

Now, if you accept that foreign key constraints make sense, than why not agree that there may be other, similar yet somewhat more complex, rules that we may want to enforce? (And if you don't accept that foreign keys make sense we may as well stop this conversation right now!) Never mind that my particular example could be arguable; assume you have a situation where you do agree that such a constraint makes sense: how do you achieve it? Received on Wed Oct 20 2004 - 11:46:35 CEST

Original text of this message