Re: Pizza Example

From: Tony <>
Date: 6 Apr 2004 05:01:24 -0700
Message-ID: <>

Jerry Gitomer <> wrote in message news:<>...
> On Mon, 05 Apr 2004 11:19:56 -0500, Dawn M. Wolthuis wrote:
> [snip]
> > What I have seen with RDBMS's is that the size constraint is placed on
> > everything while more important constraints
> > related to the allowable values are not as often applied, especially
> > when it is a "yellow flag" type of data value for an attribute rather
> > than obviously not permitted. I'll put this in a separate thread at some
> > point (but have several other questions prior to that one).
> >
> I prefer that the "more important constraints" be handled by the
> application programs rather than incorporated into the RDBMS. This is
> because the application programs are specified and written by developers
> and analysts who are working with the users and have first hand knowledge
> of the business rules while the database is cared for by the DBAs who are
> concerned with the efficiency and effectiveness of the database in meeting
> the needs of many different applications.

I was agreeing with your post right up to this bit. Yes, the database is cared for by DBAs, but the constraints are specified by analysts and written by database designers (who may or may not also be the DBAs). The very fact that the database meets the needs of many applications is the reason for handling "more important constraints" (especially) in the DBMS. Otherwise the DBMS is just a glorified file system, not a Database Management System.

It is true that current SQL products don't allow you to enforce all constraints declaratively, and that's a great pity. In an ideal RDBMS the user should be able (theoretically) to fire DML statements directly at the database and be sure of violating no integrity or security rules; the application is then just a way of making that task (much) easier. With current SQL products the best you can do is protect your tables behind stored procedures that encapsulate the rules that can't be done declaratively; still, that keeps the user-interfacing application(s) free of responsibility for enforcing business rules. Received on Tue Apr 06 2004 - 14:01:24 CEST

Original text of this message