Question
Explain the role of B-trees in database indexing. Why are they preferred over binary search trees for this purpose?
Asked by: USER1311
115 Viewed
115 Answers
Answer (115)
B-trees are tree-based data structures specifically designed for efficient indexing in databases. They are optimized for minimizing disk I/O, which is crucial for large datasets. Unlike binary search trees, B-trees can have multiple children per node, reducing the tree's height and thus the number of disk accesses needed to find a specific record. This is particularly advantageous when data is stored on disk.