Giter Club home page Giter Club logo

Comments (5)

myui avatar myui commented on June 11, 2024

@mr-bat I just noticed your comment. Sorry to be late.

It's because prefix b+tree requires a special case for deletion. Unlike general b+-tree, prefix b+-tree stores shortest possible separator as see in https://github.com/myui/btree4j/blob/master/src/main/java/btree4j/BTree.java#L802

Then, even if a key is deleted, it's hard to determine while the intermediate seperator(s) in branch nodes can be deleted or not.

from btree4j.

myui avatar myui commented on June 11, 2024

But as described in the paper, delete can be implemented with a careful implementation.
No merge feature (merging small leaves and branch shrinking) since my original motivation was append-only usecase.

Better to implement it for delete-heavy workloads.

from btree4j.

plummip avatar plummip commented on June 11, 2024

Could you explain a bit how we approach this situation?
I tryed implementing it without any luck.
-merge neighbour nodes that share the same parent
-set left/right
-remove parent separator
[if > 0 keys] -recalculate parent separator
[else] -point parent-parent to node & remove parent node

from btree4j.

myui avatar myui commented on June 11, 2024

see https://gist.github.com/myui/e2424bcd2b11741f68581a6c80b5e438

from btree4j.

mr-bat avatar mr-bat commented on June 11, 2024

You can also look at this project https://github.com/mr-bat/BPlusTree.
I ended up implementing a B+ tree of my own.

from btree4j.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.