Build fluency in the vocabulary of a wide, balanced tree locating a row in only a handful of reads.
0 / 5 completed
1 / 5
At standup, a dev mentions a database index built as a wide, shallow, always-balanced tree, where each node holds many sorted keys and child pointers, so a lookup reaches any row in only a handful of disk reads. What is this structure called?
A B-tree index is exactly this wide, shallow, always-balanced tree, where each node holds many sorted keys and pointers to children, so even a huge table can be searched in only a handful of node reads because the tree's height grows so slowly as rows are added. A hash collision is an unrelated hash-table concept about two keys sharing a bucket, not about a sorted, balanced tree. This shallow, wide shape is exactly why a B-tree index is the default choice for range queries and equality lookups in most relational databases.
2 / 5
During a design review, the team confirms the B-tree index stays perfectly balanced after every insert and delete, by splitting a full node or merging an under-full one rather than letting one branch grow far deeper than another. Which capability does this self-balancing provide?
This self-balancing provides predictable lookup time that doesn't degrade as rows are added over years, since splitting a full node or merging an under-full one keeps every path from root to leaf close to the same length, so the tree's height grows only slowly even as the table grows enormously. An unbalanced tree left to grow deep down one branch would let some lookups take far longer than others as that branch keeps extending. This automatic split-and-merge balancing is exactly what a B-tree index guarantees on every write, not just at creation time.
3 / 5
In a code review, a dev notices a query filters on a column that has no B-tree index at all, forcing the database to scan every single row in the table to find matches. What does this represent?
This is a full table scan, which a B-tree index on the filtered column would let the database avoid entirely, since the index lets it walk directly down to the matching rows in a handful of reads instead of examining every row one by one. A cache eviction policy is an unrelated concept about discarding cached entries. This full-scan cost is exactly why an unindexed filter column is one of the first things a query-performance review looks for, especially as a table's row count grows.
4 / 5
An incident report shows a report query that used to run in milliseconds started taking several seconds once the table grew past a few million rows, because the column it filtered on had no B-tree index and the database was forced into a full table scan on every run. What practice would prevent this?
Adding a B-tree index on the filtered column lets the database jump directly to the matching rows in a handful of reads instead of scanning every row in the table, which is exactly the fix for the slowdown described in this incident. Continuing to run the query against the unindexed column is exactly what let the full table scan get slower and slower as the table grew past a few million rows. This is a standard, low-risk fix, though it does add a small ongoing cost to every insert and update, since the index itself has to be kept up to date.
5 / 5
During a PR review, a teammate asks why the team is selective about which columns get a B-tree index instead of just indexing every column in every table to make every possible query fast. What is the reasoning?
Every additional index adds real overhead to every insert, update, and delete against that table, since the database has to keep each index's own balanced tree in sync with the underlying rows on every write, not just build it once. Indexing every column trades away that write performance for read speed on queries that may never actually filter or sort on most of those columns, often for no real benefit. The tradeoff is precisely why indexing decisions are usually driven by actual query patterns, adding a B-tree index only where a real, frequent query needs it rather than indexing indiscriminately.
What does the "B-Tree Index Vocabulary" vocabulary exercise cover?
This exercise tests real IT vocabulary related to b-tree index vocabulary through 5 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 5 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — this module shares real-world context with 9 other vocabulary modules. See "Related vocabulary" below to keep building a connected skill set.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.