Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Static hashing, extendible hashing, linear hashing » ?

Aussi appelé : static hashing · extendible hashing · linear hashing

Definition 21.5 University Computer Science — Year 3 · Chapitre 21 — Database Storage and Indexes

Static hashing sends key kk to bucket h(k) mod Nh(k) \bmod N for a fixed number NN of bucket pages; a full bucket chains overflow pages. Extendible hashing keeps a directory of 2d2^d pointers indexed by the last dd bits of h(k)h(k), the global depth; each bucket has a local depth d′≤dd' \le d, the number of bits its keys share, and is named by 2d−d′2^{d-d'} directory entries. A full bucket splits on bit d′d'; if d′=dd' = d, the directory doubles first. Linear hashing has no directory: buckets split one at a time, in a fixed round-robin order, whenever the load passes a threshold, and a bucket already split in the current round is addressed with one more bit.

Extendible hashing with buckets of two keys and h(k) = k. Inserting 3 (binary 11) into the full bucket of the keys ending in 1 needs a second bit: the directory doubles, the bucket splits into 01 and 11, and bucket 0, still of local depth 1, is now named by two entries.
Extendible hashing with buckets of two keys and h(k)=kh(k) = k. Inserting 3 (binary 11) into the full bucket of the keys ending in 1 needs a second bit: the directory doubles, the bucket splits into 01 and 11, and bucket 0, still of local depth 1, is now named by two entries.
Lire dans le chapitre →