Re:Managing Hierarchical Data in MySQL (or really any database)
by jerf on Friday July 17, 2009 @01:42PM
(#710356)
You seem to be assuming a record order; SQL doesn't really have that. (You can hack stuff together but you're still building on an essentially orderless foundation.) That's a fine text document format, though tabs or spaces would be more traditional in that role.
Re:Managing Hierarchical Data in MySQL (or really any database)
by TweedHeads on Friday July 17, 2009 @05:56PM
(#710881)
record: n int, val varchar2
Manage and sort in-memory and store already ordered when done (no matter if it is physically unordered).
That's why I said, for small trees and in-memory management.
For short trees and in-memory management another option would be:
Where depth levels are represented by slashes only.Replace with indexes and you have a shorter version.
Let's see what else we can come up with just for fun...