Re: Separate PK in Jxn Tbl?

From: David Cressey <cressey73_at_verizon.net>
Date: Fri, 01 Feb 2008 14:13:48 GMT
Message-ID: <wOFoj.5442$4f.4907_at_trndny06>


"Brian Selzer" <brian_at_selzer-software.com> wrote in message news:oMAoj.5076$5K1.904_at_newssvr12.news.prodigy.net...
>
> "Roy Hann" <specially_at_processed.almost.meat> wrote in message
> news:1IKdncuZltPXVj_anZ2dneKdnZydnZ2d_at_pipex.net...
> > "Brian Selzer" <brian_at_selzer-software.com> wrote in message
> > news:p9uoj.5279$0o7.473_at_newssvr13.news.prodigy.net...
> >>
> >> 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.

I think that if an application does some checking, it will also do some enforcing.

I think you might have been aiming at something like the following:

The DBMS should always enforce the constraints that it can enforce, rather than relying on applications to refrain from writing data that violates the constraints.

Note that the above is silent on what applications should or should not do regarding constraints. Received on Fri Feb 01 2008 - 15:13:48 CET

Original text of this message