There's no good way to handle graphs in SQL. If you had a tree, you could use Celko's nested-set scheme, but from your description, you don't have a tree (unless you're looking at it upside-down).
Celko's book, _SQL for Smarties_, has a short chapter on handling non-tree graphs. Also there's a paper on the web (sorry, don't have the url): "Maintaining Transitive Closure of Graphs in SQL" (Dong, Libkin, Su & Wong); it gives a lot of detail about that method. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]