Recall & Review
beginner
What is a B-tree index structure in databases?
A B-tree index is a balanced tree data structure that helps databases find data quickly by keeping data sorted and allowing fast searches, insertions, and deletions.
Click to reveal answer
beginner
Why is a B-tree index called 'balanced'?
Because all leaf nodes are at the same depth, ensuring that the time to find any data is similar, which keeps search times fast and predictable.
Click to reveal answer
intermediate
How does a B-tree index improve database search performance?
It reduces the number of disk reads by organizing data in a tree where each node can have many children, so the database can skip large parts of data and find the target quickly.
Click to reveal answer
intermediate
What happens when a node in a B-tree index becomes full?
The node splits into two nodes and the middle key moves up to the parent node, keeping the tree balanced and maintaining efficient search times.
Click to reveal answer
beginner
Name two advantages of using a B-tree index in a database.
1. Fast data retrieval even with large datasets.
2. Maintains balance automatically to keep operations efficient.
Click to reveal answer
What does the 'B' in B-tree stand for?
✗ Incorrect
The 'B' in B-tree stands for 'Balanced' because the tree keeps all leaf nodes at the same depth.
In a B-tree, what happens when a node is full and a new key needs to be inserted?
✗ Incorrect
When a node is full, it splits into two nodes and the middle key moves up to keep the tree balanced.
Which of the following is a key benefit of using a B-tree index?
✗ Incorrect
B-tree indexes speed up random data access by reducing the number of disk reads.
How are keys stored in a B-tree node?
✗ Incorrect
Keys in a B-tree node are stored in sorted order to allow efficient searching.
What is the main reason B-trees are used in databases instead of binary trees?
✗ Incorrect
B-trees are designed to handle large blocks of data efficiently, reducing disk reads compared to binary trees.
Explain how a B-tree index keeps data balanced and why this is important for database performance.
Think about how the tree structure affects search time.
You got /4 concepts.
Describe the process that occurs when inserting a new key into a full node in a B-tree index.
Focus on how the tree adjusts to keep balance.
You got /4 concepts.