Announcements Exam Friday
More Physical Storage Lecture 10
Example B+ Tree
Rules for Constructing a B+ Tree If the root is not a leaf, it must have at least two children If the tree is order n, each interior node (that is, all nodes except the root and leaf nodes), must have between n/2 and n occupied pointers (and children). If n/2 is not an integer, roundup to determine the minimizes number of pointers
Rules for Constructing a B+ Tree The number of key values contained in a non-leaf node is 1 less than the number of pointers If the tree has order n, the number of occupied key values in a leaf node must be between (n-1)/2 and n-1. If (n-1)/2 is not an integer, round up to determine the minimum number of occupied key values. The tree must be balanced, that is, every path from the root node must have the same length.
Storage Capacity Number of records that can be stored in a B+ tree –n d-1 (n-1) Each node in a tree is a block –How many records if 20 pointers per node and 3 levels?
Building a B+ Tree The nodes should not be full – 67% (internal) /78% (Leaf)
Inserting
Deleting
Inserting
Deleting
Final Tree