Efficient persistent data structures for relational database

后端 未结 3 1756
陌清茗
陌清茗 2020-12-30 09:54

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.

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-30 10:29

    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.

提交回复
热议问题