Professional Documents
Culture Documents
In Internal Hashing the hash table is in memory, where each slot holds only one entry. This type of hashing is covered in a separate lesson. This lesson covers the applications of hashing techniques for indexing records on disk, where slots are called buckets and refer to pages on disk. Each bucket may hold multiple data entries. This is called External Hashing. It is used to create hashed files (indexes), in which records are positioned based on a hash function on some field(s).
External Hashing
When searching for a record with specific field or search key in a database, we can use hashing to find the records containing that key on disk. This is done with a Hash function, which takes the key and computes an integer. This integer can be used to map to the record on disk through a: Direct file - the integer maps directly to the record. The Operating System must provide support for this type of file. Heap file - the integer maps to the id of the page containing the record, where the data page is searched sequentially. This technique works well if one directory page can hold the correct number of page ids. Lookup Table - translates relative page address (the integer computer by the hash function) to physical page addrress.
and avoid long overflow page chains. Extendible and Linear Hashing are two dynamic hashing techniques.