Re: deleting a row potentially referenced by many rows in another table

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 29 Sep 2009 19:52:18 -0300
Message-ID: <4ac28fa6$0$23753$9a566e8b_at_news.aliant.net>



Kevin Kirkpatrick wrote:

> On Sep 29, 12:36 pm, cm <cmonthe..._at_yahoo.com> wrote:
>
> I'm curious - is there any theory-based reason that most (all?)
> commercial DBMSs require a uniqueness on the parent of a foreign key
> constraint? I wouldn't imagine - I've always put it on the "DBMS-
> implementer-convenience / end-user nuisance" list of SQL features.

It falls into the category of probabilities of error. Referencing (a) non-unique attribute(s) is far more often an error than the desired reference. Having the compiler complain catches more errors earlier.

Since a FK reference is just a short-hand for a longer wff, one can alway declare the more relaxed constraint using the wff. Received on Tue Sep 29 2009 - 17:52:18 CDT

Original text of this message