Re: Nested Sets and a typical Extranet Example

From: --CELKO-- <joe.celko_at_northface.edu>
Date: 9 Sep 2003 18:00:11 -0700
Message-ID: <a264e7ea.0309091700.17296579_at_posting.google.com>


>> I'm not sure if I asked this in the original post but how receptive
is this model to constant updates, moves, additions, deletions of nodes and children? <<

There are better models for that situation, but it is not as bad as people think.

The tree structure is in a table with only two integers and a foreign key to the nodes table, so you get a lot of data pags into cache. The changes are made from one point in the numbering to the end of the table. So if the table is stored in a sorted file structure (a clustered index in Sybase/SQL Server terms), this is done via a scan fromthat point forward. This allows the other rows before the point to be used by other queries and for the engine to do page locking and releasing pretty fast.

The major advantages of nested sets are the algebraic properties and how you can use them to get reports and summary information. Received on Wed Sep 10 2003 - 03:00:11 CEST

Original text of this message