>> In nearly all of the commercial implementations and implementations of
>> systems built with commercial implementations that pervade the industry,
[quoted text clipped - 18 lines]
> I had hoped I wouldn't need to explain that it is possible to validate
> uniqueness without an index.
Of course you can validate uniqueness without an index: you can simply scan
the entire relation every time you do an insert or update (anyone with half
a brain could figure that out), but with a billion rows, that could be both
time and resource intensive.
> For example some DBMSs will allow you to use a trigger or an assertion to
> enforce uniqueness. An index is simply a method for speeding that process
[quoted text clipped - 3 lines]
> Oracle, et al are selling. A key is a logical construct and an index is a
> physical one.
The facts are what the liberal media say they are. I thought you knew that.
A key has the uniqueness property. Enforcing the uniqueness property of a
key without scanning the entire relation every time an insert or update
occurs requires implementing some form of indexing--whether that be a hash
index or table or a b-tree index or storing active domains as ordered sets
(or some facsimilie thereof, such as binary trees) or storing the relation
itself as an ordered set (making it its own index, but that only works if
the relation has only one key).
Prove me wrong.
> I'm really not sure what "claims" you want me to back up since you've
> already agreed that an index isn't always required (quote: "In nearly
> all..."). If you mean you want to know about optimisation strategies that
> don't involve indexes then you could start here: http://tods.acm.org/.
> There is a wealth of material on optimisation. Optimisation has nothing to
> do with keys of course, which brings us back to where we started...
I was hoping for more than a link that I already have in my favorites.
I notice that you didn't find fault with the meat of my original post, which
was to normalize so that there can be no nontrivial functional dependencies
where the determinant is not also a key. Why nitpick over the stupid stuff?
I'll rephrase the last part of my original response: There should already be
a mechanism in the dbms to ensure that keys are unique. Usually, that is
accomplished through the use of unique indexes. Happy? My point was that a
sound design obviates the need for a functional dependency enforcement
algorithm. It should be noted that the least efficient algorithm for
enforcing uniqueness--that is, scanning every row each time that there is an
insert or update--is more efficient than the algorithm that the OP supplied
due to the elimination of the sort.
David Portas - 27 Jul 2008 16:57 GMT
> I'll rephrase the last part of my original response: There should already
> be a mechanism in the dbms to ensure that keys are unique. Usually, that
> is accomplished through the use of unique indexes. Happy?
Perfectly happy. Same point I was trying to make.

Signature
David Portas