Junior — Middle
Can you name different types of index structures used in databases?
sobes.tech AI
Answer from AI
Databases use various types of index structures to speed up data search and sorting:
- B-Trees — balanced trees widely used for indexing, providing efficient search, insertion, and deletion.
- B+ Trees — a variant of B-Trees where all values are stored in leaf nodes, simplifying sequential traversal.
- Hash indexes — use hash functions for quick key-based access, effective for exact searches but do not support range queries.
- Bitmap indexes — used for columns with a small number of unique values, employing bitmaps for fast filtering.
- R-trees — used for indexing spatial data (e.g., geographic coordinates).
Each index type is chosen depending on the nature of the data and the types of queries.