443 - 507: Indexing based on Hashing Flashcards
What is the purpose of a hash function in database indexing?
To map data to buckets for efficient storage and retrieval.
What is a limitation of static hashing?
It cannot dynamically adjust to the data size, leading to potential overflows and underutilization.
What is the main goal of dynamic hashing techniques like extendible hashing?
To adapt the number of buckets dynamically without global reorganization.
In extendible hashing, what is the role of the directory?
Maps records to pages and grows dynamically when needed.
What happens when a page with local depth c reaches global depth d in extendible hashing?
A) The entire directory is reorganized.
B) The global depth d is increased.
C) The page is deleted.
D) A new hash function is applied.
B) The global depth d is increased.
Which method resolves overflow in static hashing?
A) Dynamic bucketing
B) Linear probing
C) Directory doubling
D) Re-indexing
B) Linear probing
What is the primary advantage of Linear Hashing over Extendible Hashing?
a) Better range query support
b) Requires no directory
c) Higher storage utilization
d) Faster retrieval speed
b) Requires no directory
Define Linear Hashing.
Linear Hashing dynamically splits buckets one by one in a round-robin fashion to handle data growth without requiring a directory.
What is the allocation factor (β) in Linear Hashing?
It is defined as 𝛽=𝑥/𝑏×𝑀 , where x is the number of records, b is the bucket capacity, and M is the number of buckets in the primary file.
What triggers a split in Linear Hashing?
A split occurs when the allocation factor β exceeds a predefined threshold.