Question
Now suppose that the Sites table is stored in a static hash table with SiteID as the hash key. Load the following records with SiteID values 9, 16, 12, 7, 20, 30 into the table. Assume that the file uses eight buckets numbered 0 to 7 and records are inserted into the hash table in the given order using the hash function h(K) = K mod 8, where K is a SiteID value. Each bucket is one disk block and holds 2 records. Show all your workings.
Solution to this question
h(9) = 9 mod 8 = 1
h(16) = 16 mod 8 = 0
h(12) = 12 mod 8 = 4
h(7) = 7 mod 8 = 7
h(20) = 20 mod 8 = 4
h(30) = 30 mod 8 = 6
My question
How do you get a very last value of each row? can anyone please explain me
I wonder whether I understood your question correctly... but here is my answer and I hope it helps.
Modulo operation (mod, or the "%" operator in C/C++/Java), "finds the remainder after division of one number by another (sometimes called modulus).".
If the source of confusion is this operation, you can read this Wikipedia page