How do I create index files in C++
Posted on 2009-04-01
I am fascinated by the sort and search method of Dbase files. In this files with extension .idx are created which
store information about the records in the main file. Indexing may be done on one field or more than one fields.
For e.g. a record may contain name and salary. Records can be indexed on name or salary or both. If one is asked to search names begining with A, all records with name starting with A are displayed or if the query is AC, all records starting with names AC are displayed. In this example the primary index is name and secoddary is salary.
Through this process retrieval is also fast.
If a new record is added the index file is updated automatically.
Kindly tell me the steps so that I may develop the algorithm using C++.