Hi all,
I've been playing around with the concepts mentioned in this article:
http://www.sitepoint.com/article/hierarchical-data-database/
(Short summary: Using Modified Preorder Tree Traversal, resulting in
left and right values for each tree node to describe the tree
structure)
With all this
, 2004 8:39 AM
To: MySQL
Subject: Hierarchical data design
Hi all,
I've been playing around with the concepts mentioned in this article:
http://www.sitepoint.com/article/hierarchical-data-database/
(Short summary: Using Modified Preorder Tree Traversal, resulting in
left and right
the other option is to parse your info from the URL, tokenizing per '/'
character, then do look ups recursively for each entry, finding the node
you're looking for.
This strikes me as the most logical solution to this particular
problem.
With regards,
Martijn Tonies
Database Workbench -
In a simple tree, one can easily see that using the title of a node as
it's primary key is not smart... names can easily collide:
The names can definitely collide. But under a file system paradigm
the combination of name with parentID will be unique and define the
tree structure you mention: