On Tue, Dec 14, 2004 at 09:16:35PM -0600, Kurt Welgehausen wrote: > > ...I'd like to use a table as a "pure" BTree ... > > If you mean a general multi-way B-Tree, I don't think > there's any practical way in SQL. If you can use a > binary tree, there are ways. The most convenient is > Joe Celko's method, which he calls nested sets. The
If that indeed is the type of tool the original poster was asking for, he may want to look at the "Tree Sortkey" implementation in OpenACS, for PostgreSQL. OpenACS uses it for hierarchal SQL queries - completely different than Oracle's "connect by", but used for much the same reasons. They considered Celko's nested sets (and in fact implemented them for testing, I believe), but ultimately chose the Tree Sortkey implementation instead. They've been using it since 2000 or so. -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/