443 - 507: Indexing based on Hashing Flashcards

1
Q

What is the purpose of a hash function in database indexing?

A

To map data to buckets for efficient storage and retrieval.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a limitation of static hashing?

A

It cannot dynamically adjust to the data size, leading to potential overflows and underutilization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the main goal of dynamic hashing techniques like extendible hashing?

A

To adapt the number of buckets dynamically without global reorganization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In extendible hashing, what is the role of the directory?

A

Maps records to pages and grows dynamically when needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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.

A

B) The global depth d is increased.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which method resolves overflow in static hashing?

A) Dynamic bucketing
B) Linear probing
C) Directory doubling
D) Re-indexing

A

B) Linear probing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

b) Requires no directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define Linear Hashing.

A

Linear Hashing dynamically splits buckets one by one in a round-robin fashion to handle data growth without requiring a directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the allocation factor (β) in Linear Hashing?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What triggers a split in Linear Hashing?

A

A split occurs when the allocation factor β exceeds a predefined threshold.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly