Efficient persistent data structures for relational database
Asked Answered
P

3

12

I'm looking for material on persistent data structures that can be used to implement a relational model.

Persistence in the meaning of immutable data structures.

Anyone know of some good resources, books, papers and such?

(I already have the book Purely Functional Data Structures, which is a good example of what I'm looking for.)

Pastille answered 19/11, 2008 at 21:27 Comment(2)
Any sorted tree would do, though if you want durability you'll want a tree with a large branching factor.Courses
Did you ever find a satisfactory answer or build anything interesting related to this?Prato
A
7

It is straightforward to modify the ubiquitous B-tree to be persistent. Simply always alloctate a new node whenever a node is modified, and return the new node to the recursive caller, who will insert it at that level by allocating a new node, etc. Ultimate the new root node is returned. No more than O(log N) nodes are allocated per operation.

This is the technique used in functional languages to implement, e.g, 2-3 trees.

Anemology answered 19/11, 2008 at 21:59 Comment(0)
J
6

I have implemented such a data structure for BergDB (http://bergdb.com/) - a database with a data model that is a persistent data structure.

I would suggest reading

http://www.cs.cmu.edu/~sleator/papers/Persistence.htm

It is the original work on how to create a persistant data structure based on an ordinary (ephemeral) one.

Judicature answered 23/8, 2013 at 1:14 Comment(0)
C
-2

SQLite has an b-tree data structure implementation you can take a look at;

Contestation answered 20/11, 2008 at 14:48 Comment(1)
sqlite b-tree is not persistentEncarnalize

© 2022 - 2024 — McMap. All rights reserved.