Nathan Hammond wrote: > Well, I'm over a week late, but I'm claiming my first piece of the > taxonomy segment if nobody tells me not to. First on my list is to > provide is an MPTT class with a series of methods that allow for > simple hierarchical storing of data in a database. The functionality > is easily split into four categories along the lines of CRUD:
Sounds good, although note that coding convention in Habari is not javaStyleFunctionNames() but uses_underscores_in_lowercase(). > I will be making one schema change to make things as fast as possible: > the addition of mptt_parent into the "terms" table. I don't see this > as a problem since this table is presently unused. That will allow for > single-query sibling selection without parsing the descendants out of > the selection. Isn't it possible to glean parent data from an MPTT structure without adding this field? I realize that the query result would be faster but: 1) Even a complex query result would be cached so that it's only slow after inserts. 2) Introducing additional data that overlaps with the MPTT structure could result in contention points. That is, if somehow a node says it's parent id is X and the MPTT structure clearly disagrees with that, what happens? It seems like it would be more difficult/effort to keep these in sync than just using the MPTT fields. 3) Adding schema is not something to take lightly, even if it's currently unused. I'm interested in the philosophy here, not trying to dissuade you from your efforts. > After this class is complete in a standalone form I'll figure out how > to reconcile it with Habari--I'm currently unfamiliar with how all the > underlying sections work and where all changes will need to appear. The one place to consider specifically is that the tag system will need to move to be implemented in these underlying data structures, but still be accessible via the existing classes; facade classes. Owen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/habari-dev -~----------~----~----~----~------~----~------~--~---
