Recall & Review
beginner
What is a dense index in database indexing?
A dense index has an index entry for every record in the data file. This means each search key value appears in the index along with a pointer to the actual record.
Click to reveal answer
beginner
What is a sparse index in database indexing?
A sparse index has index entries only for some records, usually one per data block or page. It points to the first record in each block, not every record.
Click to reveal answer
intermediate
How does a dense index affect search speed compared to a sparse index?
A dense index allows faster searches because it has an entry for every record, so the exact record can be found quickly. A sparse index may require scanning within a block after locating the pointer.
Click to reveal answer
intermediate
What is a key advantage of using a sparse index?
A sparse index uses less storage space and requires less maintenance because it stores fewer index entries, making it more efficient for large datasets where full indexing is costly.
Click to reveal answer
intermediate
In which scenario is a dense index preferred over a sparse index?
Dense indexes are preferred when fast, direct access to every record is needed, such as in primary key indexing or when records are frequently searched individually.
Click to reveal answer
Which type of index contains an entry for every record in the data file?
✗ Incorrect
A dense index has an index entry for every record, unlike a sparse index which has fewer entries.
What is a main benefit of a sparse index compared to a dense index?
✗ Incorrect
Sparse indexes use less storage because they store fewer entries.
If you want quick access to every record, which index type should you choose?
✗ Incorrect
Dense indexes provide direct pointers to every record, enabling fast access.
Sparse indexes usually have entries pointing to:
✗ Incorrect
Sparse indexes point to the first record in each data block or page.
Which index type requires scanning within a block after locating the pointer?
✗ Incorrect
Sparse indexes may require scanning inside the block because they do not have entries for every record.
Explain the difference between dense and sparse indexes in simple terms.
Think about how many records each index points to.
You got /4 concepts.
When would you choose a sparse index over a dense index? Give reasons.
Consider trade-offs between speed and storage.
You got /4 concepts.