Lecture 3 Flashcards
What is an index? Index entry?
Index: A data structure that organizes records on disk for quick access
Index entry: A pair of search key, and record address
Explain Hash based indexing
We have a hash function, H, our queries hit that hash function to determine the right bucket in the index file. The bucket stores a collection of pages, so we search bucket to find the right record.
In a tree based index structure, where is the data stored? Index values?
Data: Leaf nodes
Index: Internal nodes
Explain the difference between a clustered and unclustered index
Clustered is when the order of the index file is near identical to the order of the records
Explain the difference between a dense and sparse index
Dense: At least 1 index for every search key
Sparse: Search keys may not have a index.
Explain the difference between a primary index and a secondary index
Primary: index on the primary, unique key.
Secondary: Indexes on other columns, possible to have multiple indexes for the same search key.
Does ISAM use overflow pages or does it use node splitting?
Overflow pages.
In B+ trees, what do internal nodes store? Leaf nodes?
Internal: Index entries/Search keys
Leaf: Data entries
What is the only scenario where redistribution in B+ tree insert is useful?
When it delays/postpones/prevents a split.
When redistribution, what key value takes the position of the parent node?
The smallest key value in the second node
Does a larger height of a B+ tree increase or decrease the operational speed of the tree?
Decrease
What is fanout and how do we increase it?
Fanout is when we make the tree more “wide”
To increase fanout we can: increase page size, decrease size of index entry (key compression)