Re: Hierarchical Query

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 26 May 2005 10:58:41 -0700
Message-ID: <1117130321.195762.232070_at_g44g2000cwa.googlegroups.com>


Vadim Tropashko wrote:
> Mikito Harakiri wrote:
> > Kendall Willets suggested this method on comp.databases.theory some
> > time ago.
>
> If you are referring to this thread
> http://tinyurl.com/7q57b
> then, Kendall Willets' encoding assignes primes to leaves and is,
> therefore, volatile. The novelty of Roji Thomas' approach is that his
> method (developed into much greater detail, BTW) uses non-volatile
> encoding.

Roji Thomas' schema looks like materialized path in disguise. Let

ithprime(i)

be a function such that it returns the ith prime number, where the first prime number is 2. (BTW, there is such a function in Maple). Then let factor any number N

N = 2^n1 * 3^n2 + ... + ithprime(i)^ni

A sequence of integers (n1, n2, n3,...) in Roji Thomas' encoding case is a boolean vector. The "divides" relation "|" for numbers is "greater than" relation "<" defined component-wise. For example,

2 | 2*5*13 <==> (1,0,0,...) < (1,0,1,0,0,1,...)

Like materialized path, one can index strings of 0s and 1s effectively. Received on Thu May 26 2005 - 19:58:41 CEST

Original text of this message