Re: Unique Keys

From: Tony Andrews <andrewst_at_onetel.com>
Date: 25 Nov 2004 09:20:37 -0800
Message-ID: <1101403237.290974.236260_at_f14g2000cwb.googlegroups.com>


Kenneth Downs wrote:
> My footnote said that I was using the word "declarative" in the sense
it is
> most often used in this NG, which is simple propositions.

I'll have to take your word on that - I hadn't noticed that this NG had locally redefined "declarative" ;-)

> But I believe my original paragraph still said it, that ad-hoc SQL
does not
> constitute a scalar specification of data. It is a one-time bit of
code
> that accomplishes a single goal and provides no more useful
information.
> Every interaction with that table will require more ad-hoc code. It
> requires ad-hoc documentation.

I don't understand what you mean here. The constraint Mikito showed was not a "one-time bit of code", and no further ad hoc code is required for interaction with the table. It is DECLARED one time, and APPLIED automatically by the DBMS whenever anyone interacts with the table, without any ad hoc code having to be written by anybody. It is also self-documenting, assuming one can understand the syntax: it ASSERTS that the set of pairs of rows {i1,i2} where i1 overlaps i2 is empty. Of course that is more complex than UNIQUE(col1), but that is because it expresses a more complex rule! You can't get something for nothing in this life... Received on Thu Nov 25 2004 - 18:20:37 CET

Original text of this message