<<<<<
Main index
>>>>>
Random files (also known as Hash files)
Fill in all the gaps, then press "Check" to check your answers.
calculate code collision direct fast free good inevitable large Minimise overflow slow spread tape
Creating a hash file is an excellent way of creating a
access file structure. You do need, of course, a
access storage device, not a magnetic
, for example. You also need to ensure that you have a '
' hashing algorithm. A=1, B=2, C=3 is very poor indeed because there will be lots of different surnames that give the same hash
! This is called a 'clash' or '
'. You need to design a hashing algorithm that minimises clashes because they
down access times. On the other hand, an algorithm might also spread out the data so much that
areas of storage are used up! Having large areas of storage that aren't used efficiently is known as 'redundancy'.
Some clashes are
. When they do happen, the computer still needs to go to that memory address but then needs to start searching sequentially from there - which is why access times are reduced! An alternative method is set up an '
' block. When a clash occures, you jump to the start of the overflow block and then index down it until you find a
location. You then use that.
A good hashing algorithm will:
-
clashes.
- Ensure that the hash codes of data aren't
too far apart, wasting memory.
- Be quick to
.
Check
OK
<<<<<
Main index
>>>>>