The MP_Node abstract model provides the path, depth, and numchild fields, as well as the steplen, alphabet, and node_order_by attributes, to the Category model as necessary for constructing the tree:
- The depth and numchild fields provide metadata about a node's location and descendants.
- The path field is indexed, enabling database queries against it using LIKE to be very fast.
- The path field is made up of fixed-length encoded segments, where the size of each segment is determined by the steplen attribute value (which defaults to 4), and the encoding uses characters found in the given alphabet attribute value (defaults to Latin alphanumeric characters).
The path, depth, and numchild fields should be treated as read-only. ...