Recall & Review
beginner
What is the main purpose of an index in a database?
An index helps the database find data quickly, like a book's index helps you find a topic without reading every page.
Click to reveal answer
intermediate
Describe the structure of a B-tree used in database indexes.
A B-tree is a balanced tree with nodes containing keys and pointers. It keeps data sorted and allows fast searching by narrowing down where to look step-by-step.
Click to reveal answer
beginner
How does a B-tree index speed up searching for a value?
It starts at the top node, compares the value, and moves down the correct branch, skipping large parts of data, so it finds the value quickly without scanning everything.
Click to reveal answer
intermediate
Why is a B-tree called 'balanced'?
Because all leaf nodes are at the same depth, so the time to find any value is similar, preventing slow searches.
Click to reveal answer
advanced
What happens when a B-tree node becomes too full?
The node splits into two nodes and pushes a key up to the parent, keeping the tree balanced and efficient.
Click to reveal answer
What does a database index primarily do?
✗ Incorrect
An index speeds up data retrieval by allowing quick lookups.
In a B-tree index, what is stored in the nodes?
✗ Incorrect
Nodes store keys and pointers to child nodes to guide the search.
Why is a B-tree index called balanced?
✗ Incorrect
Balanced means all leaf nodes are at the same depth, ensuring consistent search times.
What happens when a B-tree node is full?
✗ Incorrect
A full node splits and pushes a key up to keep the tree balanced.
How does a B-tree index improve search speed?
✗ Incorrect
It narrows the search path step-by-step, skipping irrelevant data.
Explain how a B-tree index helps a database find data quickly.
Think about how a phone book helps you find a name without reading every page.
You got /4 concepts.
Describe what happens inside a B-tree when a node becomes too full.
Imagine a bookshelf that gets too full and you add a new shelf to keep things organized.
You got /4 concepts.