How are you tracking parent/child relationship now?

When I build trees, I use an adjacency list model with a column for parent
id, a column for current id, and a column for the description.  When
building the tree, I retrieve the whole data set and then use a recursive
function to parse the tree.  I pass the query into the function and use
query of query so I don't have to continually hit the database.  This works
fine on small trees like nested menus.  Unfortunately,  it can be very slow
on large trees.  On large trees, I build the tree and save the results in a
table with an indent column and sort order column.  When new nodes are
added, I rerun the build and update the stored tree.  Not optimal, but it
works.


Anyway, the administration of the trees is pretty easy.  Just open a node
and pick it's new parent.

J

-

No man's life, liberty, or property is safe while the legislature is in
session. - Mark Twain


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339531
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to