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

From: Mikito Harakiri <>
Date: 27 Oct 2004 14:53:23 -0700
Message-ID: <> (Giorgio) wrote in message news:<>...
> 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