Insert using Linear Hashing H level (n) = level+1 right most bits of n Level = 0, next = h0 1 4 4 = 100, so h0(4) = 0 7 = 111, so h0(7) = 1 7 initial Insert 5, h0(5) = 1
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h0 1 4 7 5 Insert 9, h0(9) = 1
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h0 1 4 No room, so create an overflow block, which triggers the splitting process. 7 5 9
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h1 00 01 10 11 h0 1 4 No room, so create an overflow block, which triggers the splitting process. H1(4) = 00 7 5 9
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h1 00 10 h0 1 4 Denotes split bucket No room, so create an overflow block, which triggers the splitting process. H1(4) = 00 7 5 9
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h1 00 10 h0 1 4 Advance NEXT by one. 7 5 9 Insert 8, h0(8) = 0
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h1 00 10 h0 1 4 8 7 5 9 Insert 3, h0(3) = 1
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h1 00 10 h0 1 4 8 No room, insert into overflow COULD trigger a split. 7 5 9 3
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h1 00 01 10 11 h0 1 4 8 Redistribute 7, 5, 9, 3 using H1 H1(7) = 11 H1(5) = 01 H1(9) = 01 H1(3) = 11 5 9 7 3
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 0, next = h1 00 01 10 11 h0 1 4 8 Advance Next, but it is at the bottom of the current Level. 5 9 7 3
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 h0 1 4 8 So reset it to the top and increment Level to 1. 5 9 7 3
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 4 8 Remove split indicators and only use H1 5 9 7 3
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 4 8 5 9 7 3 Insert 15, h1(15) = 11
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 4 8 5 9 No room, so create an overflow block, which triggers the splitting process. 7 3 15
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 4 8 Split Next using level+1 H function H2(4) = 100 H2(8) = 000 5 9 7 3 15
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 h2 000 8 Split Next using level+1 H function H2(4) = 100 H2(8) = 000 5 9 7 3 15 h2 100 4
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 h2 000 8 Mark bucket as split Advance Next. 5 9 7 3 15 h2 100 4
Insert using Linear Hashing H level (n) = level+1 bits of n Level = 1, next = h1 00 01 10 11 h2 000 8 Mark bucket as split Advance Next. 5 9 7 3 15 h2 100 4 And Insert and Insert and Insert ….