Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Modeling question...
> 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
![]() |
![]() |