What are indexes and types of indexes in SQL?

Indexes have nothing to do with the SQL language. Indexes are separate files that provide random access to records in a database. Indexes are great tools for the rapid retrieval of records from a database, but they are not defined by SQL. They are created and controlled by the DBMS that maintains the database.

Indexes are database objects and they are created on columns. To fetch data quickly they are frequently accessed. Different types of indexes are:

  • B-Tree index
  • Bitmap index
  • Clustered index
  • Covering index
  • Non-unique index
  • Unique index