Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Is "connect by" equivalent to "recursive with" (was Re: Is nonlinear recursion...)
"Serge Rielau" <srielau_at_ca.eye-be-em.com> wrote in message
news:c1j058$i6i$1_at_hanover.torolab.ibm.com...
> You should post in oracle.server
Not sure what is the best oracle place for SQL questions: I thought that "server" is occupied by masters of segments and extents. I'm certain neither group can spell "Datalog" anyway.
Anyway, here is the latest about same generation. Example from the Page 312 of the Alice Book
rsg(x,y) <- flat(x,y)
rsg(x,y) <- up(x,x1),rsg(y1,x1),down(y1,y)
looks very challenging for "connect by".
However, let
up^*(x,y,n)
and
down^*(x,y,n)
be transitive closure of up(x,y), and down(x,y), correspondingly, where n is the length of the path (so that if you have 2 paths of different lenght connecting x and y, then you have 2 tuples in up^* relation). Then,
rsg(x,y) <- up^*(x,x1,n1),flat(y1,x1),down^*(y1,y,n2),n1=n2
which is no-brainer for "connect by".
Therefore, the question still is "Is connect-by less expressive than recursive-with"? Received on Wed Feb 25 2004 - 18:50:13 CST
![]() |
![]() |