nested-sets Questions

1

Solved

i want to do discus/reddit/ like commenting system, i have an "id_answer" (set to 0 by defaut) field in my comment database and when user answer to another comment this field is the "id" of the par...
Gailey asked 11/10, 2011 at 18:43

5

I've been implementing some nice interactive interfaces that can sort lists in my m rails app for models that use acts_as_list. I have a sort function that gets called and sets the position for eac...
Bimetallism asked 5/5, 2009 at 14:0

2

Solved

SELECT MID, FAD.FirstOpenedDate ,LCD.LastCloseDate FROM mwMaster.dbo.Merchant M JOIN ( SELECT MerchID, MIN(moddate) AS FirstOpenedDate FROM mwMaster.dbo.MerchantStatusHistory GROUP BY MerchID )...
Milky asked 11/8, 2011 at 19:11

4

Solved

My model class is: class Category < ActiveRecord::Base acts_as_nested_set has_many :children, :foreign_key => "parent_id", :class_name => 'Category' belongs_to :parent, :foreign_key =&...
Guzel asked 1/4, 2010 at 8:30

2

Solved

I am using a nested set to represent a hierarchy in my application, and am wondering where the best place to put indexes (clustered or otherwise) is. I am using Microsoft SQL Server 2008. Operatio...
Infuse asked 5/7, 2011 at 14:9

3

Solved

I have decided to follow http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html So now I am looking for some help with the code. I am using their data for my testing, So, I visualized ...
Hols asked 9/6, 2011 at 22:8

1

Solved

I am migrating data from one database schema to another. The old schema has a categorization system based on an adjacency list, with id, category, and parent_id. If one category is under a second, ...

0

I have the following code : $treeObject = Doctrine_Core::getTable('Category')->getTree(); $rootColumnName = $treeObject->getAttribute('rootColumnName'); foreach ($treeObject->fetchRoots(...
Slusher asked 26/2, 2011 at 8:31

3

I'm storing a tree in a DB using nested sets. The table's fields are id, lft, rgt, and name. Given a node ID, I need to find all of its direct children(not grandchildren) that are themselves leaf...
Herv asked 25/11, 2008 at 3:19

2

Solved

I have a table which contains a location of all geographical locations in the world and their relationships. Here is a example that shows the hierarchy. You will see that the data is actually store...
Bigamist asked 28/1, 2011 at 17:22

2

Solved

I've spent the last few hours trying to find the solution to this question online. I've found plenty of examples on how to convert from nested set to adjacency... but few that go the other way arou...
Apoloniaapolune asked 12/1, 2011 at 1:18

4

Solved

I'm working with a tree structure in MySQL that is respresented using the nested sets model. I'm hoping some of you sql experts can help me with building a SELECT query. I would like to be able t...
Bagworm asked 23/2, 2010 at 14:38

4

Solved

Short question: How should product categories that appear under multiple categories be managed? Is it a bad practice to do so at all? Background info: We have a product database with categories li...
Shoat asked 1/10, 2009 at 15:25

3

I've been thinking about the modified preorder tree traversal algorithm for storing trees within a flat table (such as SQL). One property I dislike about the standard approach is that to insert a ...
Adrienadriena asked 26/6, 2009 at 15:25

1

Solved

I need to transform my nested sets structure (mysql) into json for this spacetree 1) http://blog.thejit.org/wp-content/jit-1.0a/examples/spacetree.html I found this function to create an array fro...
Vaunting asked 8/5, 2009 at 17:46

2

Solved

I am looking to use this concept in one of my upcoming project. More info: Managing Hierarchical Data in MySQL. Please share your experiences good or bad with examples. I am adding more informat...
Piffle asked 19/4, 2009 at 18:29

© 2022 - 2024 — McMap. All rights reserved.