Database Reference
In-Depth Information
A2.2.1 Absolute Addressing
In absolute addressing, the address is the key value. Thus,
This is a simplistic approach to hashing; it will only work for trivial cases. In most
practical cases, this approach will be inadequate, since storage will be limited.
A2.2.2 Direct Table Lookup
In direct table lookup, the following steps are taken:
The addresses are initially generated via some method. The
method used to generate these addresses could be any of the
techniques discussed in this section, or some other technique.
The keys and addresses are stored as a separate index (directory).
To access a record, the index is first consulted to determine its
address.
Figure A2-3 provides an example of an index lookup table for an employee file.
The assumptions here are as follows:
The file is keyed on the employee's identification number.
Each employee record occupies 128 bytes of space.
A means of determining the address for each record is in place.
The notation TnSn is used to denote the track number and sector
number on a hard drive (for instance T1S1 means track 1, sector 1).
Each sector can store up to 4096 bytes of data.
Figure A2-3. Example of Table Lookup for Employee Records
 
Search WWH ::




Custom Search