Explain indexing structure for index files.
Indexing
- Indexing is used to speed up retrieval of records.
- It is done with the help of a separate sequential file. Each record of in the index file consists of two fields, a key field and a pointer into the main file.
- To find a specific record for the given key value, index is searched for the given key value.
- Binary search can used to search in index file. After getting the address of record from index file, the record in main file can easily be retrieved.
- Index file is ordered on the ordering key Roll No. each record of index file points to the corresponding record. Main file is not sorted.