An index can be maintained during a reorganization of data in a database
by retaining each root segment, or the prefix component of each root
segment, in its storage location during the reorganization. Correction of
an index after a reorganization of data in a database can be facilitated
by assigning a unique token to each target segment, or the prefix
component of each target segment, and each corresponding index entry
having an address to a target segment, prior to a reorganization of data.
The unique token for a given target segment, or the prefix component for
a given target segment, and the unique token for a corresponding index
entry are the same. After a reorganization of data in the database, the
unique token of a first index entry is read. Then, the unique token of
each target segment, or the prefix component of each target segment, is
read until a match is found.