Welcome Guest, Not a member yet? Register   Sign In
To MPTtree, or not to MPTtree
#1

[eluser]TheFuzzy0ne[/eluser]
I'm building a forum, and I'm wondering whether or not MPTtree is the way to go.

I can't see there being any more than a hundred or so forums/subforums, so do I go with MPTtree, or should I just create a library that grabs all of the forums/subforums from the database, or a serialized array in a file, and have my library handle things that way?

I'm interested to know what people think. I've heard a lot about MPTT, but I can't help thinking that it might be overkill with such a small amount of data.

Many thanks.
#2

[eluser]m4rw3r[/eluser]
Why not use Adjacency lists (ie. parent_id)?
It is quite good, as long as you won't traverse the tree (ie. you never move more than one level per request/query).
#3

[eluser]TheFuzzy0ne[/eluser]
Unless, of course, I get all of the data at once, then I can use a function to iterate through the array, and build any part of the menu.

Thanks for your comments.
#4

[eluser]xwero[/eluser]
http://ellislab.com/forums/viewreply/555128/




Theme © iAndrew 2016 - Forum software by © MyBB