Re: Unique Keys
Date: Mon, 29 Nov 2004 13:20:49 -0800
Message-ID: <BzMqd.33$D24.92_at_news.oracle.com>
"Kenneth Downs" <firstinit.lastname_at_lastnameplusfam.net> wrote in message
news:3orn72-kja.ln1_at_pluto.downsfam.net...
> Can all the operators be reconciled though?
On a second thought, what about transitively closed overlap?
Consider a graph where nodes are intervals and 2 nodes have an edge between them whenever the corresponding intervals overlap. Then, 2 intervals are considered overlapping in a generalized sence (TCOverlapped) whenever there is a path between the corresponding nodes in the graph. Question: as overlap is not a relation, but rather operator [which produces an interval], how would you define TCOverlap operator?
This "enhanced" relation TCOverlapped (and also operator TCOverlap) suffers from [at least] 2 deficiencies:
i. TCOverlap definition have to take into consideration all the intervals in
the database, unlike the traditional overlap that depends on 2 arguments
only.
ii. For 2 overlapping intervals the TCOverlap operator has to be defined
somewhat counter intutively so that it contains the union of the intervals
rather than intersection.
The rest is straightforward, though. TCOverlap is an equivalence relation, so we can speak about equivalence classes (and, therefore, redefined identities). An equivalence class is connected component of the graph. 2 intervals are considered identical whenever they belong to the same equivalence class. A unique key constraint means that there is exactly one element in each equivalence class.
Does this whole approach feel satisfactory? To me, the problem (i) devaluates most of the idea, although it brings up some interesting questions. Is, for example, transive closure of interval overlapping easier than in general case? Received on Mon Nov 29 2004 - 22:20:49 CET
