week7 - CS 351 -Data Organization and Management ( Section:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 351 -Data Organization and Management ( Section: 02) LectureNotes, Week 7 Prepared by: Ilginç Demir /Anil Öztuncer /Ugurcan Karayel LINEAR HASHING Extendible hashing and dynamic hashing require index structure. However Linear Hashing requires no index structure and we can specify the load factor, as the file size changes we change the hash function. In linear hashing, the last bits in the hash number are used for placing the records in the file. Example: Begin with 8 buckets and use the last three bits. hex bin 34 100 010 17 010 001 5 000 101 28 011 100 25 011 001 50 110 010 55 110 111 8 001 000 000 8 001 17 25 010 34 50 011 100 28 101 5 110 111 55 Boundary value bv = 0 Bkfr = 3, use last k=3 bits. 2 k = tableSize < 2 k+1 SEARCH ALGORITHM Consider the last k bits of the key value, call it m. if m < bv then we use last k+1 bits as address
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
else use m as address. if necessary, follow overflow chains. TABLE EXPANSION 000 bv=0 | ,, | ,, | ,, | ,, | ,, 111 0000 001 bv = 1 ,, | ,, | ,, | ,, | ,, 111 1000 0000 0001 ,, | bv = 2 ,, | ,, | ,, | ,, 111 1000 1001 INSERTION 1. Establish the correct bucket.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/01/2011 for the course CS 351 taught by Professor Fazlıcan during the Spring '11 term at Bilkent University.

Page1 / 13

week7 - CS 351 -Data Organization and Management ( Section:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online