COMP9315 22T1 Final Exam The University of New South Wales
COMP9315 DBMS Implementation
22T1 Final Exam
DBMS Implementation
[Instructions] [PostgreSQL] [C] [Q1-3 Info]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8]

Question 6 (10 marks)

Consider a linear hashed file with the following properties

A set of numeric keys (the numbers 1 to 32) are inserted into the file, in numeric order. Splits occur just before the insertion of the keys 6, 12, 18, 24, 30 The hash value of each key is simply the binary value of the number (e.g. hash(1) = 00000001, hash(15) = 00001111, and hash(21) = 00010101).

Show the state of the file(s) at the following points:

  1. immediately before each split operation (before inserting the new value)

  2. immediately after each split operation and after inserting the new value

The state should include:

An abstract example (not using the above hash values) of what a state might look like:

[0] 1,2 -> 11,12
[1] 3,4
[2] 5,6 -> 13
[3] 7,8 -> 14,15 -> 16
[4] 9,10

d = 2 sp = 1

This is a sample just to show the format of states. It bears no relation to the hash values in this question.

Instructions:

End of Question