
Indexing Scheme

        An index is a sorted list that is used as a reference.  In
Family Scrapbook, all records are stored on disk in the order of 
record number.  Indexes are used because you will not always want 
to access the records in record number order.

        If you wanted to print a list of persons in the order of
birthdates, the program would use the birthdate index as a reference 
to find the records.  The index would tell the program what order to 
read the records from your disk so that they would be in birthdate 
order.

        Indexes are only updated by the reindex utility.  This means
that when you add, change, or delete a record, you must then reindex 
the database so that the indexes are correct.  The reindex utility 
reads all of the records from the database and then sorts them in the 
order that the index requires.  It then creates the index from this list.  
This is done for every index during the reindex process.

        Many of the reports that Family Scrapbook produces make
extensive use of the indexes, so it is wise to make sure that the 
database is properly indexed, especially before printing reports.  To 
remind you when to reindex, the program will put the letter R in the 
lower right of the screen.  It only does this when you add or delete a 
record.  Sometimes changing a record can also require reindexing, 
such as changing a person's birthdate.  In this situation the R will 
not appear.  The Reindex Database selection is found in the Utilities 
Menu, but can be run from many other areas of the program by 
pressing Alt-R.

        Note:  The reindex utility is contained in an external
executable file named REINDEX.EXE.  This file can be run directly 
from DOS.  You may wish to do this if your database grows very large 
(600 or more persons).  The reindex utility attempts to do all sorting 
in memory, but will sort to disk if there is not enough memory.  By 
running it independently of Family Scrapbook, it will have more 
memory to operate in and, therefore, will operate faster on large 
databases.

