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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Modeling question...

Re: Modeling question...

From: Ulrik Hoffmann <ulrik_at_hoffmann-kiel.de##nospam>
Date: 2000/04/25
Message-ID: <8e4ug6$8gj4a$1@fu-berlin.de>#1/1

> What's a good way to model a treeview (i.e., multiple levels with
> sublevels with sub-sublevels, etc.)?
>
> The important thing is that there is no way for me to know up front how
> many levels and (sub/sub-sub/sub-sub-sub/etc.)levels there will be.
>
> I have a product which can have one or more subcategories. Each
> subcategory can have one or more sub-subcategories an so on.
>
> I was thinking about reverse referential integrity. Would this pull the
> trick?

If each subcategory only can have one parent, your 'reverse referential...' is the right way. Oracle supports this very fine using a statement like

select * from table connect by prior...

If you need mutiple parents and multiple children, you'll need a different table with parent key and child key.

Bye
Uli Received on Tue Apr 25 2000 - 00:00:00 CDT

Original text of this message

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