All index files have to be rearranged every time a new record is added to the data file.
If there are duplicate secondary keys, the secondary key field is repeated for each entry—space is wasted.
A First Attempt at a Solution
Change the secondary index structure so it associates an array of references with each secondary key.
Advantages:
It helps avoid the need to rearrange the secondary index file. For example, if we want to add the following record:
ANG 36193 Piano Concerto 3 and 5 Prokofiev Francois
the corresponding secondary index record is simply modified to:
PROKOFIEV ANG36193 LON2312
Disadvantages:
The number of references associated with each secondary key may be restricted.
By extending the fixed length of each of the secondary index records to hold more reference fields, we might lose more space due to internal fragmentation.