graph representation in relational database

From: Nara Bala <bnaray_at_rediffmail.com>
Date: 17 Sep 2002 09:21:41 -0700
Message-ID: <9f47aead.0209170821.2bd89d3a_at_posting.google.com>



Hi,
 I would like know whether there is any efficient way to maintain a directed graph structure in relational database. I have seen Mr. Joe Celko's adjacency set structure in so many postings...i have also seen( and in fact, i am using) the more conventional adjacency list structure..with node info and parent info.  I found that the adjacency set model isnt really useful when it comes to graph structure( or am i wrong?).
  1. What if i have the following structure? a b | | c d \ / f How would the numbering go? and how would i find the parents of "f" or children of "c", "d"?
  2. How could the representation be for more complex structures with each parent having many children and each child many parents..?
  3. Also how efficient is a insertion or a deletion operation this way? Is there any way to represent graphs at all out there? awaiting response eagerly... Nara
Received on Tue Sep 17 2002 - 18:21:41 CEST

Original text of this message