Re: Transitive Closure
Date: Fri, 14 May 2004 15:35:21 -0700
Message-ID: <l%bpc.34$7Q3.118_at_news.oracle.com>
"Alfredo Novoa" <alfredo_at_ncs.es> wrote in message
news:40a51057.8060810_at_news.wanadoo.es...
> On Fri, 14 May 2004 10:23:36 -0700, "Mikito Harakiri"
> <mikharakiri_at_iahu.com> wrote:
>
> >Then, it's inconvenience, at least. Trees are usually represented with
> >relations that combine nodes and edges together, and you effectively
> >prohibit TC working with trees.
>
> You can apply the TC over a projection.
>
> >From bigger perspective, it looks more than just a minor limitation. It's
> >breaking relational closure.
>
> No because TC returns a relation.
>
> What breaks relational closure is Tutorial's D "from" operator, but it
> is intended to do that.
>
> >What other relational operator is not allowed
> >to be applied to arbitrary relation?
>
> You can invent many of them.
OK.
How about TC not commuting with selection?
TC( select x,y from {(x=1,y=2),(x=2,y=3)} where x=1 and y=3)
is not the same as
select x,y from TC( {(x=1,y=2),(x=2,y=3)}) where x=1 and y=3
The only other operator that doesn't commute with selection I'm aware of is outer join (thanks to notorious nulls). It is this extra commutativity that makes language declarative. User can write queries and be careles about the order of operations, whereas in procedural language he has to specify steps in the exact order. Received on Sat May 15 2004 - 00:35:21 CEST