Re: Hierarches

From: <bonanos_at_yahoo.com>
Date: Fri, 16 Oct 1998 06:11:23 GMT
Message-ID: <706o2c$9e8$1_at_nnrp1.dejanews.com>


> Question: Does anyone out there know how to set up a hierarchy in ORACLE?
> What I am trying to do is create a hierarchy which could, in theory, go on
> infinitely between parent and children. Any help is appreciated greatly.
> Thanks.
> -Mike-

Dunno if this is the most efficient way of storing heirarchies but it works:

If you represent each level as a table then you could basically start with your root node in table H1 and the next in H2 and the next in H3 and so on.

then you could have a procedure that writes the children. if for example the parent was in H3 the child would go into H4. if table H4 did not exist then you could create it on the fly using dynamic sql DBMS_SQL.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Oct 16 1998 - 08:11:23 CEST

Original text of this message