Re: Separate PK in Jxn Tbl?

From: Marshall <marshall.spight_at_gmail.com>
Date: Fri, 1 Feb 2008 09:08:13 -0800 (PST)
Message-ID: <f3ad3cb3-b7bb-470c-b23b-14f111c17697_at_c4g2000hsg.googlegroups.com>


On Feb 1, 12:30 am, "Brian Selzer" <br..._at_selzer-software.com> wrote:
> "Roy Hann" <specia..._at_processed.almost.meat> wrote in message
>
> >> Constraints should always be checked by the DBMS, not by applications.
>
> > I agree very heartily with the first part of this statement, for the
> > reasons you give below. I disagree with the second part (as stated).
> > There is no reason why applications shouldn't also test what constraints
> > they can. The problem is that they should not have hand-coded
> > re-implementations of the constraints because those will get out of sync
> > with the database over time. What would be very nice is if one day it were
> > possible for applications to download the relevant constraints at
> > run-time, the way they presently download other metda-data.
>
> That's a good point. I should have said instead, "Constraints should always
> be /enforced/ by the DBMS, not by applications." It is often a good thing
> for an application to do some checking because it can reduce the number of
> round-trips, and maybe even some transaction rollbacks.

Yes. In addition, if the client code knows what the database's constraints
are, it can provide better user experience, better error messages, etc.

Marshall Received on Fri Feb 01 2008 - 18:08:13 CET

Original text of this message