Questions tagged [nested-sets]

The nested set model is a particular technique for representing nested sets (also known as trees or hierarchies) in relational databases.

From Wikipedia:

The nested set model is a particular technique for representing nested sets (also known as trees or hierarchies) in relational databases.

In the nested set model, nodes are numbered according to a tree traversal which visits each node twice, assigning numbers in the order of visiting, and at both visits. This leaves two numbers for each node, which are stored as two attributes. Querying becomes inexpensive: hierarchy membership can be tested by comparing these numbers. Updating requires renumbering and is therefore expensive. Refinements that use rational numbers instead of integers can avoid renumbering, and so are faster to update, although much more complicated.

392 questions
-1
votes
2 answers

generateUrl does not work in childrenHierarchy

using generateUrl in doctrine extensions tree in action $repo = $em->getRepository('Entity\Category'); $options = array( 'decorate' => true, 'rootOpen' => '
    ', 'rootClose' => '
', 'childOpen' => '
  • ', …
  • -4
    votes
    2 answers

    jQuery Nested sets and PHP

    I'm searching for some ready-made solution for working with nested sets with PHP and jQuery. I know about nested sets and I know how to work with PHP and jQuery but I want to save my time using ready-made solution. What is the best solution?
    Mirgorod
    • 31,413
    • 18
    • 51
    • 63
    1 2 3
    26
    27