Indexes Flashcards
What is Indexing?
A data structure technique which allows you to quickly retrieve records from a database file
What is a Index?
A small table consisting of two columns
What is the first column in an index?
A copy of the primary or candidate key of a table
What is the second column in an index?
A set of pointers for holding the address of the disk block where that specific key value stored
What are the two main types of indexing methods?
- Primary Indexing
- Secondary Indexing
What is a primary index?
An ordered file which is fixed length size with two fields
What are the 2 types of primary indexes?
- Dense Index
- Sparse Index
What is a dense index?
A record is created for every search key valued in the database
Method records contain search key value and points to the real record on the disk
What is the advantage and disadvantage of dense indexing?
+ Helps you to search faster
- Needs more space to store index records
What is a sparse index?
A record that appears for only some of the values in the file
How does sparse Indexing work?
A range of index columns stores the same data block address, and when data needs to be retrieved, the block address will be fetched