Quantcast
Channel: Hacker News
Viewing all articles
Browse latest Browse all 25817

Using rational numbers to key nested sets [pdf]

$
0
0

(Submitted on 19 Jun 2008)

Abstract: This report details the generation and use of tree node ordering keys in a single relational database table. The keys for each node are calculated from the keys of its parent, in such a way that the sort order places every node in the tree before all of its descendants and after all siblings having a lower index. The calculation from parent keys to child keys is simple, and reversible in the sense that the keys of every ancestor of a node can be calculated from that node's keys without having to consult the database.
Proofs of the above properties of the key encoding process and of its correspondence to a finite continued fraction form are provided.
Comments:18 pages
Subjects:Databases (cs.DB)
Report number: DocSetID-311997
Cite as: arXiv:0806.3115 [cs.DB]
 (or arXiv:0806.3115v1 [cs.DB] for this version)
From: Daniel Hazel [view email]
[v1] Thu, 19 Jun 2008 02:06:14 GMT (10kb)

Viewing all articles
Browse latest Browse all 25817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>