Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Data Constraints AND Application Constraints

Re: Data Constraints AND Application Constraints

From: Paul <paulsnewsgroups_at_hotmail.com>
Date: Thu, 17 Mar 2005 16:02:51 +0000
Message-ID: <19aj3153u9hl2g8uja0jj3jkpb5iea0ggv@4ax.com>

"David Cressey" <david.cressey_at_earthlink.net> wrote:

>Absolutely, yes. Let's say that a certain field in a data entry form has to
>have a number in the range 20,000 to 99,000, and may not be left blank.

> The DBMS can better use its
> resources if it doesn't get distracted by this stuff.

But surely for a rule like the one above, you would also implement a constraint in the db?

Rules that are beyond the scope of a db obviously can't be there, but if they're not beyond its scope, then they should be! I do agree that programmers should perform a check at the app level, but as the number of apps pointing at the db goes up, the probability of error increases exponentially.

>The one place where I don't think the application should perform its own
>check is referential integrity. The cost is too high for the benefits.
>Keeping the reference table synchronized across multiple applications is a
>nightmare. Letting the DBMS do the check is easy.

As is letting it check for values between x and y, not null &c.

Paul...

-- 

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2, 

if Oracle group then
db := Oracle 9.2.0.1.0;
else
db := Interbase 6.0.2.0;
endif 

As a courtesy to those who spend 
time analyzing and attempting to
help, please do not top post.
Received on Thu Mar 17 2005 - 10:02:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US