{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# week7 - CS 351-Data Organization and Management Section 02...

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

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

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

View Full Document
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.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 13

week7 - CS 351-Data Organization and Management Section 02...

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

View Full Document
Ask a homework question - tutors are online