HackerPapers

arXiv:0806.3115cs.DB

Using rational numbers to key nested sets

Dan Hazel

HN submission. Found in a submission link or body. Submitters do not count as commenters in the main ranking; a submission is not an endorsement.

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.

arXiv comments
18 pages
Journal reference
DOI
Subjects
cs.DBDatabases

On Hacker News

No comments linking this paper were found in the collected sources. Found in 1 HN submission from Jan 2017 to Jan 2017. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments0 threads

No comments linking this paper were found in the collected sources. Open submission discussions.

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.