Indexing Flashcards
What is a search key?
Attribute or set of attributes used to look up records in a file.
What is the structure of an index entry?
search-key | Pointer
What factors have to be taken into account in index design?
- Access types
- Access time
- Insertion time
- Deletion time
What is a primary index
index whose search-key specifies the order of records in the data file, usually the primary key
What is a secondary indice?
Index that allows search order different from sequential order of file.
What is a dense index?
Index records appears for every search-key value in the file.
What is a sparse index?
Index records only stored for some of the key values. Find record with key <= K and scan sequentially from that record.
What are the efficiency concerns when using indexing?
Advantages: Dense gives faster lookups, sparse takes less space and requires less maintenance.
What’s a good compromise between sparse and dense indexing?
Sparse index with an index record for every disk block.
Index corresponds to least key value in block.
How does multi-level indexing work?
Outer index: Sparse index of primary index
Inner index: The primary index file.