Junior — Middle
What types of index structures are applicable in databases and for what purpose are they used?
sobes.tech AI
Answer from AI
Different index structures are used in databases to speed up data search and sorting:
- B-trees (B-Tree) — balanced trees widely used for indexing, allowing quick range value searches.
- Hash indexes — use hash functions for fast exact key searches but are not suitable for range queries.
- Bitmap indexes — effective for columns with a small number of unique values, often used in analytical databases.
- R-trees — used for indexing spatial data (geometry, maps).
Indexes reduce query execution time but occupy additional space and require updating when data changes.