This preview shows page 1. Sign up to view the full content.
Unformatted text preview: nts contains k-1 keys. A leaf page contains at least m / 2 - 1 keys and no more than m -1 keys.) Index set: indexed keys as separators stored in internal nodes Sequence set: all indexed keys stored in sequence nodes
25 worst-case search depth Level 1(root) 2 3 4 ... d Minimum number of descendants 2 2 m / 2 2 m / 2 m / 2 2 m / 2 ... 2 m / 2
d -1 3 A tree with N keys has N+1 descendants from its leaf level d. Then, 2 m / 2 d -1 N + 1 d 1 + log m / 2 (( N + 1) / 2)
e.g. N=1,000,000 and m=512, then d <= 3.37
26 FIGURE 14.11 The nodes of a B+-tree. (a) Internal node of a B+-tree with q 1 search values. (b) Leaf node of a B+-tree with q 1 search values and q 1 data pointers. 27 28 Delete Algorithm for B+-Tree Delete Key k from leaf level Check minimum requirement: Each node has Case 1: If k is also in index node m / 2 - 1 Replace k with the the previous key value Case 2: If underflow occurs in node n Find sibling leaf node (left/right) Redistribute the entries among n and its sibling to achieve half full, ow Merge node n and its (left/right) sibling , ow Three nodes merged into two leaf nodes Propagate merging to parent nodes. 29 New Version 30 31 B+-Tree vs. B-Tree E.g.1. (to calculate the order of p of a B-tree Suppose the search field is V = 9 bytes long, the disk block size is B = 512 bytes, a record pointer is Pr = 7 b...
View Full Document
This note was uploaded on 10/25/2009 for the course EE 2011 taught by Professor Denny during the Spring '09 term at National Tsing Hua University, China.
- Spring '09