Suppose that the DMV wants to be able to answer the following types of queries efficiently, that is, much faster than by searching entire relations.
i) Given a driver’s name, find the driver’s license(s) issued to people with that name.
ii) Given a driver’s license number, find the name of the driver.
iii) Given a driver’s license number, find the registration numbers of the auto(s) owned by this driver.
iv) Given an address, find all the drivers’ names at that address.
v) Given a registration number (i.e., a license plate), find the driver’s license(s) of the owner(s) of the auto.
Suggest a suitable data structure for your relations from Exercise 8.3.2 that will allow all these queries to be answered efficiently. It is sufficient to suppose that each index will be built from a hash table and tell what the primary and secondary indexes are for each relation. Explain how you would then answer each type of query.