I dont think it s hard to build a tree structure with a relational database.
However, an object oriented database would work much better for this purpose.
Using an object oriented database;
parent has a set of child1
child1 has a set of child2
child2 has a set of child3
...
...
In an object oriented database you can build this structure pretty easy.
In relational database, you will have to maintain foreign keys to parent.
parent
id
name
child1
parent_fk
id
name
child2
parent_fk
id
name
..
essentially, while you are building your tree structure you will have to join all these tables, or you can iterate them.
foreach(parent in parents){
foreach(child1 in parent.child1s)
foreach(child2 in child1.child2s)
...