Lecture 4 - Indexes 1 - Template
Lecture 4 - Indexes 1 - Template
Topics:
Basic Concepts
Ordered Indices
B+-Tree Index Files
Reading:
Chapter 14
Basic Concepts
Search Key:
Index file:
Q: Recall dictionary abstract data types. What data structures might we use to store values? What are
the implications of using these data structures?
Index Evaluation Metrics
Ordered Indices
Clustering index:
Secondary index:
Index-sequential file:
Q: Can you think of the tradeoffs of sparse index files vs. dense index files?
Secondary Indices Example
Multilevel Index
Indices on Multiple Keys
Q: Suppose we had a query like select * from students where name = “John” and ID < 13000? How
would we find records using an index on name?
Example of B+-Tree
Properties:
Example of B+-tree
Q: When searching for the next branch to follow in an internal node (or for a key in a leaf node),
what is best approach?
Non-Unique Keys
Solution
Updates on B+-Trees: Insertion
Example of Deletion:
Efficient alternative 1:
Q: If we can cache at least as many nodes as in the path from root to a leaf, why does this
approach improve performance?
Efficient alternative 2:
B-Tree Index Files
Note: Index Organized Tables