Re: Nested Sets vs. Nested Intervals

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 18 Nov 2005 16:25:42 -0800
Message-ID: <1132359942.041222.299160_at_g49g2000cwa.googlegroups.com>


asdf wrote:
> Thank you very much.
>
> I have the category in one table. The website listings in another
> table. Each website listing contains a cat_id referencing the 'id'
> column in the 'web_directory' table. Searches are done by matching the
> listings title, description, etc. What is the most efficient way to
> restrict the results to a specific category?

I prefer formal description of the problem. In Celko words "please post DDL"
> How efficient is the nested intervals model compared to the adjacency
> model for moving categories?

Adjacency relation is more efficient for moving categories. In nested intervals you have to recalculate encodings of all the nodes in a tree branch. The formula for encoding recalculation is quite simple, but still the overall efficiency can't match adjacency model where you change the encoding of just one node. Received on Sat Nov 19 2005 - 01:25:42 CET

Original text of this message