Re: foundations of relational theory?

From: Marshall Spight <mspight_at_dnai.com>
Date: Wed, 29 Oct 2003 06:55:34 GMT
Message-ID: <GvJnb.40328$275.92135_at_attbi_s53>


"cmurthi" <xyzcmurthi_at_quest.with.a.w.net> wrote in message news:3F9EDAAD.6030907_at_quest.with.a.w.net...
>
> Thanks, Jonathon. Firstly, the constraint syntax is reminiscent of old
> scripting languages; field = '' [then] field != '' [then]... I am
> assuming this is a common syntax. Procedural syntax is simply more
> elegant, but that's not a functional comment, it's an aesthetic one.

The syntax for simple boolean expressions is pretty clean, IMHO. Note that I am not in any way defending SQL syntax; I think it sucks.

> More to the point, the more complex the constraint (and I was giving
> only the simplest above,) won't it become, simply, unreadable?

I would argue that the complexity of procedural code is greater than the complexity of declarative code. However, the "density" of the declarative is also be higher, and that might negatively affect readability. I have no hard data on this.

> And what
> if you wanted the constraint to be be dependent on "foreign" data

That's perfectly acceptable. Note that a foreign key is an example of such a constraint.

> That is the main problem of centralizing the constraints; you would have
> no user-feedback until submit of the entire dataset, which is both
> frustrating and counter-productive, and, in fact probably unacceptable
> to users

I wouldn't say this is a consequence of centralizing the constraints per se; I'd more say it's a consequence of the separation between the application language and the database. If the application language had a way to retrieve the constraints from the db as easily as it retrieves any other kind of resultset data, and test them in client code, this issue wouldn't come up. (Say, *there's* an idea!)

> (or, I should say, used to be; web-based data entry is inuring
> us to nasty messages at submit time instead of at data-entry time.)

Agreed. The web was designed for retrieval and display of hypertext documents; this is the only thing it does well. Alas, it is now being used as the basis for most client/server computing, a task for which it is dismally unsuited.

> So, as you say, you check once at dataentry time and again (perhaps
> more robustly,) at dbms time.

You have to do this in any client/server system anyway, unless the client code runs on trusted computers.

Marshall Received on Wed Oct 29 2003 - 07:55:34 CET

Original text of this message