Consider a table that describes the customers :
Customers(custid, name, gender, rating)
The rating value is an integer in the range 1 to 5 and only two values (male and female) are recorded for gender. Consider the query “how many male customers have a rating of 5”? The best indexing mechanism appropriate for the query is
(A) Linear hashing
(B) Extendible hashing
(C) B+ Tree
(D) Bit-mapped hashing
Explanation: Since we require only 2 bits 0 and 1 to record gender of customers we easily implement it using bit-mapped index.
So, the correct answer is (D)
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.