Static Hashing

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is the worst hash function among the given choices
The sum of the digits modulo 8
The sum of the digits modulo 2
The sum of the digits modulo 5
The sum of the digits
Explanation:
The sum of the digits classifies the data into the highest number of buckets, thus making the job to track the buckets more difficult than the rest.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
What is a bucket overflow?
When a bucket does not have enough space
There are insufficient buckets
When Bucket skew occurs
All of the mentioned
Explanation:
Bucket overflow can occur in many ways. When a bucket does not have enough space, there are insufficient buckets, when a bucket skew occurs.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
In a __________ we organize the search keys, with their associated pointers, into a hash file structure
Hash file organization
Hash index organization
Hashing address
None of the mentioned
Explanation:
Hashing can be used for 2 different purposes, hash file organization and hash index organization. In a hash index organization, we organize the search keys, with their associated pointers, into a hash file structure.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
If K denotes the set of all the search key values, and B denotes the set of all bucket addresses, a function from K to B is called as __________
Bucket function
Address function
Hash function
Search function
Explanation:
If K denotes the set of all the search key values, and B denotes the set of all bucket addresses, a function h from K to B is called as the hash function. It determines which bucket should contain the data in question.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
Some buckets are assigned more records than the others which causes bucket overflow, this condition is called as ________
Bucket sufficiency
Bucket insufficiency
Bucket skew
Bucket normalcy
Explanation:
Some buckets are assigned more records than the others which causes bucket overflow, this condition is called as Bucket skew. Skew occurs if multiple records have the same search key or if the given hash function is non uniform.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
Overflow handling using a linked list of buckets is called as ____________
Bucket chaining
Overflow chaining
Bucket linking
Overflow linking
Explanation:
All the overflow buckets are chained together in a linked list. Overflow handling using a linked list of buckets is called as Overflow chaining.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
State true or false: Hash indices are only primary index structures
True
False
Explanation:
Hash indices are only secondary index structures. A hash index is never needed as a clustering index structure.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
In a __________ , we obtain the address of the disk block containing a desired record directly by computing a function on the search key value of the record
Hash file organization
Hash index organization
Hashing address
None of the mentioned
Explanation:
Hashing can be used for 2 different purposes, hash file organization and hash index organization. In a Hash file organization, we obtain the address of the disk block containing a desired record directly by computing a function on the search key value of the record.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
The term ______ is used to denote a unit of storage that can store one or more records
Basket
Bucket
Unit
Set
Explanation:
The term bucket is used to denote a unit of storage that can store one or more records. A bucket is typically a disk block but it can also be larger than a disk block.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
State true or false: A hash index organizes the search keys, with their associated pointers, into a hash file structure
True
False
Explanation:
A hash index organizes the search keys, with their associated pointers, into a hash file structure. We can construct a hash index by applying a hash function on a search key and store the key and its associated pointers in the bucket.