[prev] 23 [next]

Exercise 2: Cost of Search in Hashed File

Consider the hashed file structure b = 10, c = 4, h(k) = k%10

[Diagram:Pics/scansortproj/hash-file-10.png]

Describe how the following queries

select * from R where k = 51;
select * from R where k > 50;

might be solved in a file structure like the above (h(k) = k%b).

Estimate the minimum and maximum cost (as #pages read)