Working of Primary Indexing
- In primary indexing, the data file is sorted or clustered based on the primary key as shown in the below figure.
- An index file (also known as the index table) is created alongside the data file.
- The index file contains pairs of primary key values and pointers to the corresponding data records.
- Each entry in the index file corresponds to a block or page in the data file.
Primary Indexing in Databases
Indexing is a technique used to reduce access cost or I/O cost, now the question arrives what is access cost? Access cost is defined as the number of secondary memory blocks which is transferred from secondary memory to main memory in order to access required data. In this article, we are going to discuss every point about primary indexing.
Contact Us