record forsayroll number then the student' roll number is the primary index indexed sequential files are common example where primary index is associated with the file secondary index an index whose search key specifies an order different from the sequential order of the file is called as the secondary index for exampleif the record of student is searched by his namethen the name is secondary index secondary indices are used to improve the performance of queries on non-primary keys dense and sparse indices in dense indexthe index table stores the address of every record in the file howeverin sparse indexthe index table stores the address of only some of the records in the file although sparse indices are easy to fit in the main memorya dense index would be more efficient to use than sparse index if it fits in the memory figure shows dense index and sparse index for an indexed sequential file record pointer to number record record pointer to next record record pointer to number record record record record record record record record record record record record record record (adense index pointer to next record (bsparse index figure dense index and sparse index note that the records need not be stored in consecutive memory locations the pointer to the next record stores the address of the next record by looking at the dense indexit can be concluded directly whether the record exists in the file or not this is not the case in sparse index in sparse indexto locate recordwe first find an entry in the index table with the largest search key value that is either less than or equal to the search key value of the desired record thenwe start at that record pointed to by that entry in the index table and then proceed searching the record using the sequential pointers in the fileuntil the desired record is obtained for exampleif we need to access record number then record number is the largest key value that is less than so jump to the record pointed by record number and move along the sequential pointer to reach record number thus we see that sparse index takes more time to find record with the given key dense indices are faster to usewhile sparse indices require less space and impose less maintenance for insertions and deletions cylinder surface indexing cylinder surface indexing is very simple technique used only for the primary key index of sequentially ordered file in sequentially ordered filethe records are stored sequentially in the increasing order of the primary key the index file will contain two fields--cylinder index and several surface indices generallythere are multiple cylindersand each cylinder has multiple surfaces if the file needs cylinders for storage then the cylinder index will contain entries