Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Do you know where your variables are?
 
PerlMonks  

Hierarchy Management is Easy With the a Powerful Database

by princepawn (Parson)
on Mar 05, 2001 at 18:40 UTC ( [id://62323]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Graphical Hierarchical Tree

The oracle database has a CONNECT statement which allows for easy traversing of hierarchically coded info:
SELECT LEVEL, SUB, SUPER FROM PARTS CONNECT WITH PRIOR SUPER = SUB
LEVEL is a builtin Oracle variable which tells you current depth of traversal. SUB and SUPER are table columns which show which parts are subordinate to others.

And of course, you can use LPAD():

SELECT, LEVEL, LPAD(' ', LEVEL, SUB), SUPER;
to "tab over" each degree of recursion. Or write your own function to create display as needed.

Perl is nice, but server side database preprocessing can be faster and more definitional.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://62323]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.