Richard,

There's an excellent method for handling hierarchical trees in Joe
Celko's SQL for Smarties which he refers to as the "Nested Set Model."
There are some excellent tutorials on using the Nested Set Model w/CF on
SecretAgents.com:

http://www.secretagents.com/index.cfm?fuseaction=freeviewlets.viewlet&vi
ewlet_id=45&CFID=492326&CFTOKEN=88407308

The only thing the Nested Set Model doesn't do very well, is dynamic
sorting of each branch--because the logic it uses, sets a predefined
ordinal value to all the nodes. There are ways to work around this of
course, and you can even combine Nested Set Model w/the traditional
parent_id/child node relationship.

Hope this helps!
-Dan

> -----Original Message-----
> From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 18, 2002 1:33 PM
> To: CF-Talk
> Subject: hierarchical database.....
> 
> I'm having a job getting my head around this one.
> 
> Essentially I am trying to establish a hierarchical structure in a
> database in such a way one is not having to do loads of recursive
> queries to return the path between one item and another in the tree...
> is this even possible?
> 
> One idea someone threw at me was XML.... well I understand WDDX, but I
> don't understand the principles of using XML as an actual database.
> Could this solve my problem?
> 
> All ideas & suggestions welcome!
> 
> --
> Regards;
> 
> Richard Meredith-Hardy
> -------------------------------------------------------------
> [EMAIL PROTECTED]
> 
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to