Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how B+ trees work (maybe)
- generating the following tree:
- 3 5
- / | \
- 1 2 - 3 4 - 5 6 7
- is done by adding elements in the order:
- 3 > 5 > 7 > 1 > 2 > 6 > 4
- (or a number of other ways)
- Facts:
- 1) Each node contains a series of values
- 2) The values are stored from least to greatest
- 3) There is a maximum number of values that can be stored
- in the node
- 4) each sibling retains a reference to the next sibling
- and so on until the last sibling
- Insertion Assumptions
- 1) When this value is reached (not exceeded), a copy of
- the median value is maintained in parent and the remaining elements are split into to children nodes
- 2) The elements smaller than the median element are moved
- to a child node on the left, the elements larger than the median node are moved to a child node on the right.
- 3) When a child node exceeds the maximum load value, the
- node is split into to nodes along the median value, this is recurisve
- 4) When a child node exceeds the maximum load value, the
- median value is copied to the parent node, this is recursive
- Deletion Assumptions
- 1) Weht?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement