RDBMS Questions and Answers – Dynamic Hashing

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

1. Dynamic hashing allows us to?
a) Accommodate the growth of the database
b) Accommodate the shrinkage of the database
c) Allows modification of hash function
d) All of the mentioned
View Answer

Answer: d
Explanation: Dynamic hashing allows us to accommodate the growth of the database and the shrinkage of the database by allowing us to change the hash function dynamically.

2. Dynamic hashing is also called as _________
a) Extended hashing
b) Extendable hashing
c) Static hashing
d) Movable hashing
View Answer

Answer: b
Explanation: Dynamic hashing is also called as extendable hashing because it can accommodate the growth and shrinkage of the database.

3. Which of the following operations can be performed on an extendable hash structure?
a) Lookup
b) Insertion
c) Deletion
d) All of the mentioned
View Answer

Answer: d
Explanation: We can perform lookup, insertion and deletion on a dynamic hash structure.
advertisement
advertisement

4. The space overhead in dynamic hashing is ________ than that of static hashing
a) More
b) Less
c) Equal
d) None of the mentioned
View Answer

Answer: b
Explanation: The space overhead in dynamic hashing is less than that of static hashing. This is because the hash function is chosen based on the size of the file at some anticipated point in the future.

5. Which of the following is a disadvantage of the dynamic hashing structure
a) Buckets can be allocated dynamically
b) Lookup involves additional level of indirection
c) It involves a lesser space overhead
d) Hash structure can be modified dynamically
View Answer

Answer: b
Explanation: In dynamic hashing, lookup involves an additional level of indirection. The rest of the options are the advantages of dynamic hashing.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. The form of dynamic hashing that avoids the additional level of indirection is called as _________
a) Linear hashing
b) Static hashing
c) Directive hashing
d) Indirective hashing
View Answer

Answer: a
Explanation: The form of dynamic hashing that avoids the additional level of indirection is called as Linear hashing. This has more overflow buckets than extendable hashing.

7. Hash structures are not the best choice for which of the following?
a) A search key on which individual point queries are likely
b) A search key which is invalid
c) A search key on which range queries are likely
d) A search key on which multi-level queries are likely
View Answer

Answer: c
Explanation: Hash structures are not the best choice for search keys on which range queries are likely because the range queries might contain different values of the search keys which might result in improper placement in the hash table.
advertisement

8. Which of the following is an issue that needs to be considered while choosing an indexing technique?
a) Frequency of insertion and deletion
b) Data types of the data
c) Number of items in the relation
d) None of the mentioned
View Answer

Answer: a
Explanation: The frequency of insertion and deletion has to be taken into consideration while choosing an indexing technique. The frequency of insertion and deletion determines the hash index.

9. Which of the following hash function classifies data into least number of buckets?
a) Sum of digits modulo 8
b) Sum of digits modulo 5
c) Sum of digits modulo 2
d) Sum of digits
View Answer

Answer: a
Explanation: The sum of digits modulo 2 classifies the data into only 2 buckets i.e. 0 and 1.
advertisement

10. Which of the following hash function classifies data into the highest number of buckets ?
a) Sum of digits modulo 8
b) Sum of digits modulo 5
c) Sum of digits modulo 2
d) Sum of digits
View Answer

Answer: d
Explanation: The sum of the digits hash function classifies the data into 10 different buckets thus making it the highest.

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.