nested-sets Questions

3

Solved

I am working hierarchical data, as in the tree structure. i want to know what is the best way to store them in database. I started with adjacency list, in MySQL. But the performance seems to dip a...
Woodworker asked 14/5, 2014 at 6:14

5

Solved

I am working on an adjacency list with mySQL and can not (atleast by myself) do the thinking needed to make a decent enough query to be able to move a set of nodes (together with eventual children ...
Protectorate asked 10/5, 2010 at 8:28

6

Solved

I have a list of items in a hierarchy, and I'm attempting to parse this list out into an actual hierarchy of objects. I'm using modified pre-order tree traversal to store/iterate through this list,...
Monogram asked 25/11, 2008 at 22:24

13

Solved

I'd need a MySQL query that moves a node and all its children within a nested set. I found this site, but that function just seems so illogical - there's no universeid or treeid in a nested set mod...
Snailfish asked 20/5, 2009 at 18:37

6

Solved

I'm looking for a PHP (with MYSQL) nested sets class with all needed functions. For example: createLeftNode, createRightNode,createRootNode, createSubNode,deleteNode and moveTree. Not only 1 left,...
Ettore asked 7/11, 2008 at 13:4

3

Solved

I have hierarchical data in a nested set model (table:projects): My table (projects): id, lft, rgt 1, 1, 6 2, 2, 3 3, 4, 5 4, 7, 10 5, 8, 9 6, 11, 12 7, 13, 14 ... Pretty printed: 1 2 3 4 ...
Dremadremann asked 16/11, 2009 at 18:12

7

Solved

I'm using the awesome_nested_set plugin in my Rails project. I have two models that look like this (simplified): class Customer < ActiveRecord::Base has_many :categories end class Category &l...
Bloodstain asked 3/9, 2009 at 9:20

1

Solved

I using https://github.com/creocoder/yii2-nested-sets extension for Yii2! So, first version for Yii1 was good but in this version i have some problem. All done strictly according to the manual! ...
Gaillard asked 10/10, 2015 at 5:29

1

Solved

In Nested Set Model, there's a challenge for me to convert sql to linq. The above wikipedia link shows how to list up immediate children of given node as below sql syntax, and it works well when I...
Quianaquibble asked 31/8, 2014 at 14:34

3

I have two tables: localities: CREATE TABLE `localities` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `type` varchar(30) NOT NULL, `parent_id` int(11) DEFAULT NULL, ...
Auscultate asked 3/1, 2012 at 18:15

3

Solved

having an e-commerce application under development i am trying to get my head around the following problem: I have my categories realized through the awesome_nested_set plugin. If I list my article...

3

Solved

I'm working with nested sets for my CMS but since MySQL 5.5 I can't move a node. The following error gets thrown: Error while reordering docs:Error in MySQL-DB: Invalid SQL: SELECT baum2.id AS ...
Unblinking asked 21/4, 2011 at 10:50

2

Solved

I have a MySQL query that I thought was working fine to retrieve all the ancestors of each node, starting from the top node, down to its immediate node. However when I added a 5th level to the nest...
Tokay asked 8/1, 2014 at 10:54

8

When I refer to nested set model I mean what is described here. I need to build a new system for storing "categories" (I can't think of better word for it) in a user defined hierarchy. Since the n...
Cranny asked 14/10, 2008 at 15:33

8

Solved

I have your run of the mill nested set hierarchy type setup with the following columns: table name: myset columns: id, name, lft, rgt Does anyone know a query to determine the parent of a no...
Hammered asked 21/10, 2009 at 18:6

1

Solved

I have a hierarchical data. The most common queries will be "get parent branch for node" and "get subtree of node". Updates and inserts are not likely to occur often. I am choosing between nested s...
Projectile asked 24/9, 2012 at 15:32

2

Solved

I have the following table structure, which is also on sqlfiddle for convenience: +---------+-----------+---------+----------+-----------+-------------------+-----------------------------------+-...
Wraith asked 22/10, 2012 at 17:32

4

Solved

I have an MPTT tree of over 100,000 records stored in MySQL using lft, rght and parent_id columns. Now the left/right values became corrupted, while the parent ids are still intact. It would requir...
Lassiter asked 2/9, 2010 at 3:30

2

Among the known limitations of Joe Celko's nested sets (modified pre-order traversal) is marked degredation in performance as the tree grows to a large size. Vadim Tropashko proposed nested interv...
Breeding asked 11/12, 2008 at 20:16

5

There is no limitation on the depth. How to get the structured branch or even entire tree? The definition is from here: Managing Hierarchical Data in MySQL
Spoonbill asked 7/4, 2010 at 1:12

1

Solved

It is good to use Nested sets for the hierarchical data. But in this design you should calculate always the right and the left nodes if you delete or insert some data. Additionally you don't have a...
Flaming asked 17/8, 2012 at 13:51

0

I would like to know if there is some kind of plugin to manage nested set db design in entity framework 4.2 http://en.wikipedia.org/wiki/Nested_set_model I have hierarchical data to deal with, a...
Cly asked 21/2, 2012 at 3:55

8

Solved

Based on Getting a modified preorder tree traversal model (nested set) into a <ul> One of answers gave right code to display full tree. What i need is to always show first level (depth=0) an...
Cavanaugh asked 11/10, 2011 at 16:13

7

Solved

I am trying to get my data which is hierarchically set up with a tree traversal model into an < ul> in order to show on my site. Here is my code: function getCats($) { // retrieve all childr...
Abnegate asked 21/8, 2009 at 8:12

3

Is there a simple way to display the entire nested set when using this plugin? What I would like to do is display an unordered list of root nodes with another unordered list inside each child that ...
Segno asked 13/1, 2010 at 20:17

© 2022 - 2024 — McMap. All rights reserved.