b trees
DESCRIPTION
DBMSTRANSCRIPT
![Page 1: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/1.jpg)
B Trees
![Page 2: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/2.jpg)
Sample B tree
![Page 3: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/3.jpg)
• Minimization Factor : No of allowable Children for each node
• every node must have at least t - 1 keys
• Every node may have at most 2t - 1
![Page 4: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/4.jpg)
• the height of an n-key b-tree
With t greater than or equal to 2,
![Page 5: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/5.jpg)
Sample B tree
![Page 6: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/6.jpg)
![Page 7: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/7.jpg)
B-tree of order 5
all internal nodes have at least ceil(5 / 2) = ceil(2.5) = 3 children
maximum number of children that a node can have is 5
![Page 8: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/8.jpg)
Insertion
• B-tree of order 5:
C N G A H E K Q M F W L T Z D P R X Y S
Order 5 means that a node can have a maximum of 5 children and 4 keys.
All nodes other than the root must have a minimum of 2 keys.
![Page 9: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/9.jpg)
• C N G A Order this ACGN
• Inserting ACGN
![Page 10: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/10.jpg)
Inserting H
![Page 11: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/11.jpg)
Inserting E, K, and Q proceeds without requiring any splits:
![Page 12: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/12.jpg)
Inserting M requires a split
![Page 13: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/13.jpg)
The letters F, W, L, and T are then added without
needing any split
![Page 14: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/14.jpg)
Adding Z
![Page 15: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/15.jpg)
Inserting D
![Page 16: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/16.jpg)
Inserting s
![Page 17: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/17.jpg)
DELETION (H)
![Page 18: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/18.jpg)
Delete T
![Page 19: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/19.jpg)
Delete R
![Page 20: B Trees](https://reader036.vdocuments.net/reader036/viewer/2022082704/557d63a2d8b42ae1438b533a/html5/thumbnails/20.jpg)
Delete E