trees in sql – no more nested sets?

I looked for sql trees on the net, and it seems there is another method called ‘nested intervals with farey fractions’. This is really heavy math stuff, but looks interesting. Obviously it gets around the problem that on average half of the total nodes of an SQL nested set table must be updated if you do a structural change (insert, move, delete…) – which results in very bad performance for large trees.

Recommended reading:

Nested intervals with Farey fractions

Static hierarchies and binary fractions in PostgreSQL 

Modeling trees with nested sets and nested intervals 

Explore posts in the same categories: SQL

2 Comments on “trees in sql – no more nested sets?”

  1. Bossxero Says:

    Congratulations. Its a nice blog you are keeping here. Keep it up and all the best.

    If you have some time, do check my personal blog @ http://forexkid.blogspot.com and don’t forget to leave a little comment for me while you are there.

    Regards.

  2. Hendy Irawan Says:

    Greg,

    I think it’s a good thing to implemented in the (distant) future…

    I’d say that this stuff requires performance of reads much more important than updates, which is why even plain nested sets is still a good thing compared to simple hierarchy.

    I think there are very few sites that require speedy updates to ACLs. Even so, a good DBMS should make it so that updates in progress doesn’t affect a running site (that performs only read operations to ACL tables).


Comment: