Re: Support of SQL recursive queries (over cyclic graphs)

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 27 Oct 2004 14:53:23 -0700
Message-ID: <8a529bb.0410271353.657fb8d5_at_posting.google.com>


giorgio.terracina_at_tiscalinet.it (Giorgio) wrote in message news:<38b58a78.0410270341.2b7182c1_at_posting.google.com>...
> Hi,
>
> Anyone knows if some DBMS supports SQL recursive queries over cyclic
> graphs?

DB2, Oracle already support them. SQLServer is adding recursive "with" implementation next year.  

> I mean, I know that some DBMS supports recursive queries (SQL3) but
> only on Tree-like data structures (e.g. finding an anchestor, etc.)

There is no such limitation.  

> I need to perform queries like "find all pairs of nodes connected by a
> path in a (possibly cyclic) graph", where the graph is represented by
> a relation Arc(x,y) stating all the pairs of nodes x and y directly
> linked by an arc in the graph.
>
> I tried with Oracle and DB2, but they not seem to support cyclic
> graphs, only trees.

You need to try harder. A chapter on Recursive Queries in DB2 cookbook is a good start. Received on Wed Oct 27 2004 - 23:53:23 CEST

Original text of this message