Subject Re: Open to suggestions: building a tree
Author Brandon Smith
Frank,
Thanks for the suggestion, I would like to look into something that
would make the select "flatter." I'll search for nested sets and see
what's out there. I would appreciate it a bunch if you could send me
what you mentioned.

And, Helen, somewhere in my utils I've something I wrote back in my TP
3 days that parsed strings. I was kind of hoping I could work
something out inside FB.

Thanks again,

Brandon

--- In firebird-support@yahoogroups.com, Frank Ingermann <frank@f...>
wrote:
>
> Since Helen answered your main question, and the subject says you're
> open to suggestions, here's one: ;-)
>
> Have you considered using Nested Sets instead of the parent link
> method to store the tree? Whether this makes sense for you or
> not depends on the structure (depth) and the amount of inserts/
> deletes you'll typically have, but the plain advantage is that
> you can do a single, "flat" select to read out the entire tree
> at once - whereas the parent link approach requires a recursive
> stored proc.
>
> In case you're interested, google for "nested sets" and you'll
> find lots of how-tos. I've made a little Firebird/IBO demo
> too, if you like i can send it over.
>
> (@Helen: this may be nice for the Contributed section of IBO?)
>
> Cheers,
> Frank