Indexing Flashcards
What is the purpose of database indices?
To enable efficient query processing by avoiding full relation scans
What are the two basic types of indices?
Ordered indices and Hash indices
What are the key factors for evaluating index techniques?
Access type support, lookup time, insertion time, deletion time, and space overhead
What is a clustering/primary index?
An index where the search key defines the sequential order of the file
What is a secondary index?
An index whose search key specifies an order different from the sequential order of the file
What is a dense index?
An index with entries for every search-key value in the file
What is a sparse index?
An index with entries for only some search-key values, usable only when records are sorted by search key
What is a multilevel index?
An index that creates a sparse outer index on the original (inner) index to improve search efficiency
How does B+-tree handle duplicates?
By either storing multiple entries or using buckets to store pointers to all records with the same key
What is the main advantage of B+-tree over static indexing?
Maintains efficiency despite insertions and deletions without requiring reorganization
What are the key properties of B+-trees?
All paths from root to leaf are same length, nodes have between ⌈n/2⌉ and n children
What is bulk loading in B+-trees?
Efficient technique to build index by sorting entries first, then building tree bottom-up
What is the main limitation of hash indices?
They don’t support range queries effectively
How does overflow chaining work in hash indices?
Records that hash to a full bucket are stored in overflow buckets linked to the original bucket
What is an LSM tree?
Write-optimized index with multiple B+-trees starting from in-memory to on-disk structures
What is the key idea of buffer trees?
Associate buffers with internal B+-tree nodes to reduce write operations