Académique Documents
Professionnel Documents
Culture Documents
Database Design
Disk Storage Devices
Chapter 13 Files of Records
Operations on Files
Ordered and Unordered Files
Disk Storage, Basic File Hashed Files
Structures, and Hashing Extendible and Linear Hashing Techniques
RAID Technology
CS 6360.501 (Fall 2009)
Storage Area Networks
Instructor: Sunan Han
The University of Texas at Dallas
Slide 13- 2
Chained for
records from
h(K) same bucket
Linear Hashing
Extendible
Hashing Linear hashing does require an overflow area but does not
use a directory
Initial hashing is h1(K) = K MOD M, M = number of buckets
Buckets are split in linear order as overflow occurs: first
overflow occurs, bucket0 is split into two. Second overflow
Before expending. If
full, expand d’ = 3 and occurs, bucket1 is split into two, …
redistribute records Use a variable n to keep track of which bucket has just been
based on 010 and 011
split (or how many have been split). When split, the records
are redistributed between the two buckets based on a new
Before expending. If
hash function hi+1(K) = K MOD 2iM (It’s possible because of
full, expand d = 4 and the property hi+1(K) = either hi(K) or hi(K) + 2i-1M)
redistribute records At each bucket, an overflow chain is needed for records that
based on 1100 and
1101. Directory has 16 cause overflows but the bucket’s turn of split is yet to come
entries Slide 13- 35 Slide 13- 36
Linear Hashing Linear Hashing
h1(K) = K MOD M In retrieving a record with field value K, if h(K) < n, then re-
hash it using hi+1(K) because it was in a bucket which has
been split. So, n divides the records as far as which hash
Bucket0 Bucket1 Bucket2 Bucket3 Bucket4
function is used
When n = M, all original M buckets have been split and hi+1
applies to all buckets now
Split Split Split
M=5 n can be reset to zero and any new overflow leads to the use
of a new hash function hi+2(K) = K MOD 4M
Bucket5 Bucket6 In general, hashing function hi+j(K) = K MOD 2jM is used for
Bucket7
records who hashes to buckets with a number < n, and
n=3
hi+j+1(K) = K MOD 2j+1M is used for other records, where j =
When h1(K) < n or splitting 0,1,2, …. Each j is a pass of split of buckets
use h2(K) = K MOD 2M
Slide 13- 37 Slide 13- 38
Ethernet
Assignment #11
Page 507: 13.27, 13,28
Due 11/16/09
Slide 13- 51