Data and Index Files

As a minimum, your database has a data file and an index file. The data file contains the tables in your database, and all the records stored in them. As well as application data, it contains the data dictionary, the maps and messages used in your database, and any programs written with QA Build, Report Writer or Importer.

The index file provides the access mechanism for data retrieval. This file contains the keys together with pointers to the records in the data file. The index file is structured as a B-Tree.

When a record is deleted, a hole the size of the deleted record is left in the data file. DP4 dynamically re-uses the space. When a new record is added to the database, the database manager places it in the next available free space that is larger than the record.

You can use the status and integrity checking utility to find out what percentage of the data file is being used to store data. The Database Reorganisation utility removes any holes when it compresses the data file.

From release 4.622 databases may also have a Data compression information (DCI) file, and a Data Pointer (PTR) file. The DCI file is used to store information that allows the data file to be compressed more effectively. The (PTR) file contains information about where each record is in the data file. This information used to be in the index file, but storing it separately enables the index to be smaller overall, and speeds up certain database operations.