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?).
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?).
- 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"?
- How could the representation be for more complex structures with each parent having many children and each child many parents..?
- 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