Hi,

I'm exploring what DB-model for storing hierarchical data will suit my application best. As far as I can see there are two options: the adjency list model and the tree traversal model.

The first one is pretty clear to me, and with it I'm able to get the entire tree or a portion of it into a nested array for further processing.

However, somehow the tree traversal method intrigues me and I want to see if it will fit my needs. So far my first major obstacle is to extract the data from the DB as a nested array, which I can pass on to my gui-class.

My testing db looks like this now:

id|title|lft|rgt
1|root|1|10
2|item1|2|3
3|item2|4|9
4|item2.1|5|6
5|item2.2|7|8

Can anyone give me some pointers on how to process this?

Thanx in advance!

Cheers, Michiel