# B Tree Searching Example

Wiki info

Usually, the number of keys is chosen to vary between d{\displaystyle d} and 2d{\displaystyle 2d}, where d{\displaystyle d} is the minimum number of keys, and d+1{\displaystyle d+1} is the minimum degree or branching factor of the tree. In practice, the keys take up the most space in a node. The factor of 2 will guarantee that nodes can be split or combined. If an internal node has 2d{\displaystyle 2d} keys, then adding a key to that node can be accomplished by splitting the hypothetical 2d+1{\displaystyle 2d+1} key node into two d{\displaystyle d} key nodes and moving the key that would have been in the middle to the parent node. Each split node has the required minimum number of keys. Similarly, if an internal node and its neighbor each have d{\displaystyle d} keys, then a key may be deleted from the internal node by combining it with its neighbor. Deleting the key would make the internal node have d−1{\displaystyle d-1} keys; joining the neighbor would add d{\displaystyle d} keys plus one more key brought down from the neighbor's parent. The result is an entirely full node of 2d{\displaystyle 2d} keys. computer science - Deleting key from a B+ Tree - Stack ... #42 資料庫基礎 - Index 所用的資料結構 B tree ~ 大毛電腦科學筆記 computer science - How many keys can be contained at leaf ... 