9 Buckets Hard Disks consist of platters of magnetic media
10 Buckets - Cont.. Tracks are written to the surface of the disk
11 Buckets - Cont.. Tracks are broken into sectors
12 Buckets - Cont.. Each Sector can have 1 or more blocks of data written to it. When I/O is performed a block of data is transferred.
13 Buckets - Cont.. Each block can contain multiple records. When a block is read multiple records are pulled into memory Block of data read into memory
14 Buckets - Cont.. When a bucket becomes full a pointer to an Overflow bucket tells the search algorithm where to look.
15 Extendible Hashing Suffix describes the element in the bucket An index is broken into 2 sections aaabbbbbb: aaa - bbbbbb Prefix describes the index table bbbbbb
16 Extendible Hashing As a bucket becomes full, the prefix is split. Assume key 000bbbbbb or 001bbbbbb is inserted causing the bucket to become full bbbbbb
17 Extendible Hashing If the index cant support another bucket, then the index is expanded to include another bit. aaaa-bbbbb Assume key 000-bbbbbb is inserted, then index cant support a split so the index must be expanded to 4 bits. bbbbb … …
18 Hashing - Open Addressing & Deletions Delete 75 1 Do a Search Set Delete Flag Search For 49 Search skips deleted cell Continues until 49 is found Adding a new value 16 => f(16)=1 16 Add value, if deleted remove delete flag. Search for an empty or deleted cell.
19 Hashing - Internal Chaining & Deletions Assume 88 is deleted 1 Insert f(a) =1 Delete flag is removed, a is inserted 10 a Idx on 2 is updated 2 Internal chains coalesce Insert f(b) =1 Search for an empty cell b Insert b into cell Update Internal Chain