250+ TOP MCQs on Dynamic Hashing and Answers

RDBMS Multiple Choice Questions 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

Answer: d
Clarification: 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

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

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

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

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

Answer: b
Clarification: In dynamic hashing, lookup involves an additional level of indirection. The rest of the options are the advantages of dynamic hashing.

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

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

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

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

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

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

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *