Sobes.tech
Junior — Middle

What is considered the base index in a database?

sobes.tech AI

Answer from AI

The primary index in a database is an index that is created based on the table's primary key. It ensures the uniqueness of records and is used for quick lookup by this key.

Features of the primary index:

  • Usually implemented as a clustered index, meaning the data in the table is physically ordered according to this index.
  • Guarantees the uniqueness of primary key values.
  • Used for fast access to rows by key.

Example: if a table has a field id with a primary key, then the primary index is created specifically on this field.