Re: Hierarchies in the relational model
From: Vadim Tropashko <vadimtro_at_yho.cm>
Date: Tue, 21 Oct 2003 10:22:33 -0700
Message-ID: <J4elb.11$5H6.80_at_news.oracle.com>
Date: Tue, 21 Oct 2003 10:22:33 -0700
Message-ID: <J4elb.11$5H6.80_at_news.oracle.com>
Paul wrote:
> I wonder if these additions can be somehow incorporated into an
> extended relational model instead of being added on as a kind of
> afterthought? And whether such a thing is in fact necessary or
> desirable?
Instead of transitive closure operator can I alternatively suggest a distance function? Suppose we have
table graph (
    tail integer,
    head integer
)
view nodes
select tail as node from graph
union
select head as node from graph
select a.node as head, b.node as tail from nodes a, nodes b where distance(a.node, b.node, graph) > 0
Note, that this is purely declarative definition, no inflationary semantics, etc. Received on Tue Oct 21 2003 - 19:22:33 CEST
