Date page D.7 else /* record for V has been found */ ; For "Ackroyd,S" we get a match on the third iteration; we retrieve the corresponding record and find that it is indeed the one we
Trang 1Copyright (c) 2003 C J Date page D.7
else /* record for V has been found */ ;
For "Ackroyd,S" we get a match on the third iteration; we retrieve the corresponding record and find that it is indeed the one we want
For "Adams,V" we get "index entry high" on the sixth
iteration, so no corresponding record exists
For "Allingham,M" we get a match on the seventh iteration; however, the record retrieved is for "Allen,S", so it's
permissible to insert a new one for "Allingham,M" (We're
assuming here that indexed field values are required to be
unique.) Inserting "Allingham,M" involves the following steps
1 Finding space and storing the new record
2 Adjusting the index entry for "Allen,S" to read
1 - 3 - lle
3 Inserting an index entry between those for "Allen,S" and
"Ayres,ST" to read
3 - 1 - i
Note that the preceding index entry has to be changed In
general, inserting a new entry into the index can affect the
preceding entry or the following entry, or possibly neither──but never both