We want to locate where our records are. We might have to resort to index, just like when we are trying to find a key word, we go to the indice in the back of a book.
Basic concepts:
Indices
Indices are used to locate record; Attributes that are used to loop up are called search key. They don’t have to be Key or super key.
Ordered indices: it is based on sorted order of the records
Hash indices
operations and performance affected by choice of indices
Access type:
We can have specific attribute look up or range look up
Space overhead
Deletion
Insert
Ordered indices
Ordered indices are indices that store indices in sorted order.
Clustering indices
Record in the files might themselves be sorted in some order. A clustering index is an index whose search key also defines the sequential order of the file.
They are also called primary index.
Nonclustering indices
Indices order is different from the sequential order of the records. There is a second list that has pointers to the physical rows.
Index entry
It is a search key value and pointer to one or **more than one ** records that has the specific search key value.
Dense index
Index entry appears for every search key value in the file.