-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey All,

I recently added a new proposal draft to the wiki for a new component, I
am attempting to get out of the box support for the modified preorder
tree traversal algorithm, I have some working code kindly provided by
Hector Virgen, that does basically what I am proposing (it just needs
refinement) and am just after some feedback on the proposal from the
community.

The proposal is located at:
http://framework.zend.com/wiki/display/ZFPROP/Zend_Db_Table_Mptt+-+Nick+Pack

An excellent article on what MPTT is and how you use it is at (for those
of you that have no idea what MPTT is!):
http://www.sitepoint.com/article/hierarchical-data-database/

I have a couple of questions with regards to its design that I would
like some feedback on.

1. Should the top level parent node have parent_id values of 0 or NULL,
from a normalisation perspective, one would guess that the parent should
be 0 so that all values in the col are of the same type, however by
using 0 you are effectively creating a reference to a non-existant row -
any feedback on this behavior would be greatly appreciated

2. This question is with regards to handling deletion of nodes that have
children, it would seem much more sensible to move the child nodes of
the deleted node up to the grandparent node, rather than breaking the
chain of parent references or deleting the child nodes completely, is
this the best way to approach it?

Thanks,

Nick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJKbWZZAAoJEDENZSw4OipTv1IH/jScWXLlZv6SGGYBNe0j2z0/
d1xNNPGzUFzXp1FVrScMLN5ZAT/jFqkttjpGSw8NG6rhUXlRKgxAnib3EqgYnBBO
DP6BMBFqBijBpGCPVXH58KZ7ezPll6qvZ2B00qviH1WuqUBqLzAmOL3wgKUlkeaw
rHM6sGKNG/dBiNrZ4iXVMWTV4fm8jypasMvHQcm1Z9i1u+J+i6OeLZw4wkJucZwn
pML+EPf1MEhsCoFqgmMwMQLPRKDJM7+abU9O0OuhlpZYega0A1v/9DjSVN7nkuLc
fjsDrP3YPk60Y24tVok2rmm6UCWvvAEAT4IOE41tw3wrOjiE64P5IUVirEe2B9Y=
=xZtm
-----END PGP SIGNATURE-----

Reply via email to