This question is asking about primary and secondary indexes, and it was incorrectly marked as duplicate by some guys who proposed something that has nothing to do with indexes.
For your information, - A single-level index is an auxiliary file that makes it more efficient to search for a record in the data file.
A primary index is an ordered file whose records are of fixed length with two fields.
- The first field is of the same data type as the ordering key field—called the primary key—of the data file,
- The second field is a pointer to a disk block (a block address).
A secondary index is defined on an unordered data file and can be defined on
- a key field (with a unique value) or
- a non-key field with duplicate values
A secondary index is also an ordered file with two fields. The first field is of the same data type as some nonordering field of the data file that is an indexing field. The second field is either a block pointer or a record pointer.
As you can see, a primary index IS NOT a primary key. Please, before you mark a question as duplicate, make sure you understand it first :)
You should start reading this book :)