maks
maks

Reputation: 6006

Btree implementation

I'm writing the model of database which is using the B+ tree datastructure. I know how to implement this structure on Java using only RAM. But I need to write data on the disk(each time when I write, modify or delete)

How can I implement this structure?

Upvotes: 3

Views: 3133

Answers (2)

Jan Kotek
Jan Kotek

Reputation: 1084

I would recommend using a library. Writting BTree may look simple on paper, but with a few millions items and rebalancing it gets harder.

There is an BTree/HTree which stores its nodes on disk. It implements Map and Set interface. http://code.google.com/p/jdbm2/

New version of this library is under development at github: https://github.com/jankotek/JDBM3

Upvotes: 5

Aravind Yarram
Aravind Yarram

Reputation: 80166

See if this is helpful: How does the file system store a b-tree?

Upvotes: 3

Related Questions