RDBMS Questions and Answers – Static Hashing

This set of RDBMS Multiple Choice Questions & Answers (MCQs) focuses on “Static Hashing”.

1. The term ______ is used to denote a unit of storage that can store one or more records
a) Basket
b) Bucket
c) Unit
d) Set
View Answer

Answer: b
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.

2. 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 __________
a) Bucket function
b) Address function
c) Hash function
d) Search function
View Answer

Answer: c
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.

3. 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
a) Hash file organization
b) Hash index organization
c) Hashing address
d) None of the mentioned
View Answer

Answer: a
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.
advertisement
advertisement

4. In a __________ we organize the search keys, with their associated pointers, into a hash file structure
a) Hash file organization
b) Hash index organization
c) Hashing address
d) None of the mentioned
View Answer

Answer: b
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.

5. What is a bucket overflow?
a) When a bucket does not have enough space
b) There are insufficient buckets
c) When Bucket skew occurs
d) All of the mentioned
View Answer

Answer: d
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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Some buckets are assigned more records than the others which causes bucket overflow, this condition is called as ________
a) Bucket sufficiency
b) Bucket insufficiency
c) Bucket skew
d) Bucket normalcy
View Answer

Answer: c
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.

7. Overflow handling using a linked list of buckets is called as ____________
a) Bucket chaining
b) Overflow chaining
c) Bucket linking
d) Overflow linking
View Answer

Answer: b
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.
advertisement

8. State true or false: A hash index organizes the search keys, with their associated pointers, into a hash file structure
a) True
b) False
View Answer

Answer: a
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.

9. Which of the following is the worst hash function among the given choices
a) The sum of the digits modulo 8
b) The sum of the digits modulo 2
c) The sum of the digits modulo 5
d) The sum of the digits
View Answer

Answer: d
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.
advertisement

10. State true or false: Hash indices are only primary index structures
a) True
b) False
View Answer

Answer: a
Explanation: Hash indices are only secondary index structures. A hash index is never needed as a clustering index structure.

Sanfoundry Global Education & Learning Series – RDBMS.

To practice all areas of RDBMS, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.