What is difference between primary index and secondary index?
Primary Index
a) It is an ordered file whose records are of fixed length along with two fields.
b) Only based upon the primary key.
c) The total number of entries in the index is similar as the number of disk blocks in the ordered data file.
d) Primary index is a king of nondense (sparse) index.
e) There might be at most one primary index for a file
f) Requires less storage space.
Secondary index
a) It offers a secondary means of accessing a file for which a few primary access already exists.
b) May be relies on candidate key or secondary key.
c) It comprises large number entries because of duplication.
d) Secondary index is a type of dense index.
e) There may be much more than one secondary indexes for the same file.
f) Requires more storage space and longer search time.