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 -> Re: putting a tree structure into a relational model

Re: putting a tree structure into a relational model

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sun, 02 Apr 2000 21:54:19 +0800
Message-ID: <38E7510B.34CD@yahoo.com>


dinesh wrote:
>
> Does any body know an easy and efficient way of changing a
> hierarchical database ( a tree structured database) into a
> relational one.
>
> Please let me know if you do.
>
> thanks,
>
> dinesh
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!

Rows with PARENT and CHILD columns are the norm - and then using the hierarchical query constructs (connect by, start with).

I've commonly seen people also maintaining a second strucuture which is a row for parent and "any" child (ie directly or indirectly linked) which is very useful for when reporting anyone 'below' at known level in the hierarchy.

HTH
--



Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse Received on Sun Apr 02 2000 - 08:54:19 CDT

Original text of this message

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