Re: Hierarchical Query
Date: 25 May 2005 12:23:05 -0700
Message-ID: <1117048985.084993.174910_at_o13g2000cwo.googlegroups.com>
--CELKO-- wrote:
> I wish I had seen this before finishing TREES & HIERARCHIES IN SQL.
> The only problem I can see is the size of the primes as the trees get
> larger, but we are living in a 64-bit world now. Since the math is
> simple integer division and multiplication, the speed is probably
> pretty good.
Kendall Willets suggested this method on comp.databases.theory some time ago.
> Random thought: if we give each node a prime in a general graph, then a
> cycle
Prime numbers set with "divided by" binary relation is a partial order. More specifically it is a lattice. An arbitrary DAG can be embedded into a lattice. However, the prime numbers encoding for graphs is volatile. Adding a node into a graph would force to recalculate encodings for large graph fragment. Plus, how to handle acyclic graphs? Received on Wed May 25 2005 - 21:23:05 CEST