Jump to content

Talk:Nested set model

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

(another) alternative for drawbacks section?

[edit]

Another (insert-friendly) alternative is known as ORDPATH (used in SQL Server's XML implementation). Seems to be similar to 'nested intervals' although not sure if conceptually identical. May be worth mentioning/linking to.

untitled

[edit]

This term appears to be specific to a book by Joe Celko. The present test quotes an article as being the first to use the term, but the article merely mentions the term as originating from the Joe Celko book. Does this really warrant a full article? Rp (talk) 17:19, 15 July 2010 (UTC)[reply]

Oh well, it's a full article now. Rp (talk) 09:30, 24 August 2010 (UTC)[reply]

Mention MPTT in the article body

[edit]

I think that it's proper to mention "Modified Pre-order Tree Traversal" as a definition for MPTT somewhere in the body of the document, as the citation below the article is not easily seen. Ojtibi (talk) 04:43, 10 January 2012 (UTC)[reply]

Mention also Topological Ordered Tree

[edit]

I have published the original 1992 article and I have always used the term "Topological Ordered Tree." This is more general than MPTT and allows for the possibility of Post-Order traversal and other variations (e.g. use of offsets) that enhance the functionality of the technique although they are not included in this article. — Preceding unsigned comment added by Kamfonas (talkcontribs) 16:43, 12 October 2016 (UTC)[reply]

Simpler SQL for determining parent without depth

[edit]

Whilst subqueries has a slight performance hit, it does make the SQL a lot simpler for determining immediate parents:

SELECT
    Child.Node,
    (SELECT Node FROM Tree WHERE Left = max(Parents.Left)) as ParentNode
FROM
    Tree AS Child, Tree AS Parents
WHERE
    Parents.Left < Child.Left AND Parents.Right > Child.Right
GROUP BY Child.Node;

Technically of course, all this is doing is calculating the depth on the fly, rather than having it stored in the table. TFk (talk) 10:43, 12 April 2012 (UTC)[reply]

MySQL 8+ already supports for recursive join

[edit]

Here are the top google search results:

https://stackoverflow.com/questions/20215744/how-to-create-a-mysql-hierarchical-recursive-query

https://dev.mysql.com/doc/refman/8.0/en/with.html

https://www.mysqltutorial.org/mysql-recursive-cte/

I don't know the sourcing policy for programming topics, so I just paste them here. Betty (talk) 13:34, 22 August 2021 (UTC)[reply]

"Celko"?

[edit]

"Celko" is mentioned but the article gives no indication of who this is or their relevance 216.19.187.249 (talk) 09:27, 4 January 2024 (UTC)[reply]