Re: Many-to-many with both FK cascading deletes?
Date: Mon, 21 Jun 2010 17:25:55 +1000
Message-ID: <4c1f1404$0$14086$afc38c87_at_news.optusnet.com.au>
Erwin wrote:
> The concept of "cascade delete" is pretty well understood and pretty
> well-defined, and if some DBMS chooses to support it, it is that
> DBMS's responsibility to do so properly. That is, it is the
> responsibility of that DBMS's authors to see to it that their
> implementation does not cause any "problems". If it did, their
> implementation would be flawed.
SQL Server 2000 was flawed, but in a responsible way, if I may say that.
In other words, they detect when adding a new FK can yield multiple cascade paths over the records of any table at the time the FK is declared, and reject that constraint if there *might* be a problem at runtime.
Obviously that's not as good as detecting when there actually *is* a record that has multiple paths and only doing the operation once, but at least it's better than just blowing up at update time. Received on Mon Jun 21 2010 - 09:25:55 CEST