[prev] 49 [next]

Exercise 5: Cost of Deletion in Heaps

Consider the following queries ...

delete from Employees where id = 12345  -- one
delete from Employees where dept = 'Marketing'  -- pmr
delete from Employees where 40 <= age and age < 50  -- range

Show how each will be executed and estimate the cost, assuming:

  • b = 100,  bq2 = 3,  bq3 = 20
State any other assumptions.

Generalise the cost models for each query type.