February 18, 2019
$\sigma_C(R)$ and $(\ldots \bowtie_C R)$
(Finding records in a table really fast)
Every step of binary search is a random access
Every tree node access is a random access
Random access IO is bad.
Idea: Load a bunch of binary tree nodes together.
Binary Tree: $1$ separator & $2$ pointers
$K$-ary Tree: $(K-1)$ separators & $K$ pointers
Important: You still need to do binary search on each node of a $K$-ary tree, but now you're doing random access on memory (or cache) instead of disk (or memory)
How do you handle updates?
B+Tree = ISAM + Updates
Idea 1: Reserve space for new records
Just maintaining open space won't work forever...
Maintain Invariant: All Nodes ≥ 50% Full
(Exception: The Root)
Deletions reverse this process (at 50% fill).
Next Class: Hash- and CDF-Based Indexes