Re: Separate PK in Jxn Tbl?

From: Marshall <marshall.spight_at_gmail.com>
Date: Fri, 1 Feb 2008 09:16:37 -0800 (PST)
Message-ID: <ec6499ca-60a4-40c8-af14-f8d820bbb1ff_at_f47g2000hsd.googlegroups.com>


On Jan 31, 4:59 pm, "Brian Selzer" <br..._at_selzer-software.com> wrote:

>

> Constraints should always be checked by the DBMS, not by applications. If
> you have two separate applications that manipulate the same table, and one
> enforces one constraint while another enforces another, then all you need to
> do to bypass one constraint is to use the other application! What, then, is
> the point of even having the constraint?

I think that application constraints and database constraints are really
two entirely separate things. The fact that they may be structurally identical obscures and confuses this point. (Hence Brian's entirely reasonable rhetorical question above.)

What, indeed, is the point of having one application and not another enforce a constraint, *if we view this from the perspective of the requirements of the database* Clearly there is none. However individual applications may have requirements that are best implemented as constraints *within the application.* I call these "application constraints" because they are specific to the application. They are *not* integrity constraints, even if we are using identical mechanisms (in different locations) for both.

Marshall Received on Fri Feb 01 2008 - 18:16:37 CET

Original text of this message