Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL and Table Structure for Graph Traversals

SQL and Table Structure for Graph Traversals

From: Kenneth Murphy <ukemurp_at_worldnet.att.net>
Date: 1998/02/11
Message-ID: <6brit9$qe0@bgtnsc03.worldnet.att.net>#1/1

Hello.

In the database application I am currently working on, I am needing to do traversals of data that can be modeled as a 4 level directed graph with each child node potentially having more than one parent node.

Each level represents a geography depth of

1 = State
2 = Region within a state
3 = County within a region
4 = Community within a region

What is the best way to represent this in a relational model and is there a way to write a single SQL statement that can retrieve all the records assigned to an arbitrary node, and both its parent nodes and child nodes at all depths.

Does anyone know of a book that discusses this?

Any suggestions would be appreciated.

Sincerely,
Kenneth Murphy
University of Missouri - Columbia
Office of Social & Economic Data Analysis kenneth_at_oseda.missouri.edu Received on Wed Feb 11 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US