5 exercises on database key phrases. Choose the most natural and professional option.
0 / 14 completed
1 / 14
During a performance review, you notice a slow query is scanning every row in a million-record table instead of using an index. How do you describe this in a technical meeting?
"This query is doing a full table scan" is the precise database performance term for sequential reads across every row in a table — the most expensive query access pattern. A full table scan (also called a sequential scan in PostgreSQL) occurs when no suitable index exists or the query planner decides not to use one. This phrase immediately tells the team what is wrong and what the fix is: add an index or rewrite the query. Option A ("crashing") implies a system failure, not a performance issue. Option C ("overloaded") is vague. Option D ("broken") is imprecise. SQL EXPLAIN output will confirm a full table scan explicitly.
2 / 14
A colleague asks how to speed up a query that filters users by email and created_at on a table with 50 million rows. What is the professional recommendation?
"I'd add an index on those columns" is the standard database optimisation recommendation for filter-heavy queries on large tables. A composite index on (email, created_at) allows the database engine to jump directly to matching rows using a B-tree or hash structure, avoiding the full table scan. This is the first and most impactful performance lever in relational databases. Option A (rewriting in another language) does not change how the database executes the query. Option B (deleting rows) destroys data. Option C (moving the server) addresses hardware, not the query plan. Indexing is the correct first-line solution.
3 / 14
Your team is about to run a schema migration in production that drops a column. A senior engineer asks about safety. What is the most important thing to confirm first?
"The migration needs a rollback plan" is the correct priority for any destructive schema change in production. A rollback plan — typically a reverse migration script that restores the dropped column and its data — is essential risk management. Without it, a failed or incorrect migration can cause irreversible data loss. Option B ("will be fast") is a performance concern, secondary to safety. Option C ("no one will notice") is dangerously dismissive of impact. Option D ("no data in it") is a prerequisite check, but not a substitute for a rollback plan — even empty columns can have application code dependencies. Always plan for rollback before deploying schema changes.
4 / 14
You are writing a database operation that transfers funds between two accounts and must ensure both the debit and the credit either both succeed or both fail. Which statement describes the correct approach?
"We should run this in a transaction" is the correct answer for any operation requiring atomicity — the guarantee that multiple related writes either all succeed or all roll back together. Database transactions provide ACID guarantees: Atomicity, Consistency, Isolation, and Durability. A fund transfer is the textbook transaction example — if the debit succeeds but the credit fails, money disappears. Option A (two separate queries) has no atomicity guarantee and can leave the database in a corrupt state. Option B (stored procedure) could use a transaction internally, but the statement itself does not guarantee one. Option D (async queue) introduces delays and complicates rollback logic. Transactions are the standard solution.
5 / 14
Your team adds a new nullable column to a database table that is already in production. A developer asks if this will break existing API clients. Which statement correctly describes the safety of this change?
"The schema change is backward-compatible" is the correct technical description. A backward-compatible (or non-breaking) schema change is one that existing application code can continue to run against without modification. Adding a nullable column is the safest type of schema change: existing INSERT statements that do not reference the new column will succeed (the column receives NULL), and existing SELECT queries will still return valid results. Removing a column, renaming a column, or adding a NOT NULL column without a default are examples of breaking changes. Understanding this distinction is critical for zero-downtime deployments — always favour backward-compatible migrations that decouple schema changes from code deployments.
6 / 14
Alex: 'The query is running incredibly slowly. It's scanning the entire `users` table! Can you help?' You're reviewing this code review comment. What's the most effective response to suggest a solution?
The problem description points to a full table scan, which is often caused by missing or poorly utilized indexes. Suggesting an index on the `email` column directly addresses this potential bottleneck. Options A and B are irrelevant – server load and connection pools don't solve a missing index issue, while suggesting a different indexing strategy would be less targeted than addressing the core problem.
7 / 14
Sarah (in a Slack channel) asks: 'I'm trying to optimize this query that joins `orders` and `customers`. It's really slow. Any suggestions?' You need to formulate a response suitable for a technical discussion. Which of the following is the *most* appropriate initial recommendation?
The first step in optimizing any slow query is understanding *why* it's slow. An explain plan will reveal details about table access methods (e.g., full scans), index usage, and potential bottlenecks. While indexes can help, you need to diagnose the issue before blindly applying one. Options A and B are incorrect – a full table scan is what's causing the problem, and a composite index isn't always the best solution without knowing the specific query.
8 / 14
Ben, a senior database engineer, states: 'We're about to run a schema migration that drops the `deprecated_field` column from the `products` table. What's the single most crucial thing we must verify before proceeding?'
Before dropping any column, you *must* confirm that no applications or processes are still relying on it. Dropping the column while dependencies exist will cause errors and potentially corrupt data. While backups and testing are important, they don't address the fundamental issue of dependent code.
9 / 14
Chloe: 'I'm writing a database operation to transfer funds between two accounts. We need to ensure that if one transaction succeeds, the other *must* succeed as well – we can't have a partial transfer.' Which statement accurately describes the correct approach?
For an all-or-nothing transfer, optimistic locking is a good strategy. This involves comparing version numbers before applying changes; if they differ, the operation fails, preventing partial updates. Two-phase commit (2PC) is generally complex and often overkill for this scenario. Using separate transactions with manual rollbacks can easily lead to inconsistencies.
10 / 14
Mark is frustrated: 'This query against the `orders` table is taking forever! It's sorting every row by `order_date`, and it's incredibly slow. I suspect a missing index.' Which response best addresses Mark's concern during a code review?
Mark's observation points towards a lack of an index on the `order_date` column, which would explain the slow sorting operation. Suggesting an execution plan is the most proactive step, allowing for detailed analysis and pinpointing the root cause. Options A and C are dismissive; option D suggests shifting blame instead of finding a solution.
11 / 14
During a Slack discussion about optimizing a slow query joining `products` and `categories`, David asks: 'I'm seeing a lot of full table scans. Any recommendations on how to improve this?' Which response is most appropriate?
David's query likely suffers from missing or ineffective indexes. Adding an index on `product_id` and `category_id` would significantly improve join performance by reducing full table scans. Increasing RAM doesn't directly address the indexing issue; backups and scaling are premature reactions.
12 / 14
Emily, a database engineer, is reviewing a proposed schema migration that involves adding a new column to an existing production table. A junior developer asks: 'Will this break any of our existing API clients?' What's the most important initial verification step?
The primary concern with adding a new column to a production table is its impact on existing clients. Immediately updating SDKs is crucial to prevent unexpected behavior and errors. While performance analysis and schema review are important later steps, ensuring client compatibility takes precedence.
13 / 14
During a standup update, Liam states: 'We're migrating the `users` table to a new database server. It's dropping the old `last_login` column.' A team member asks: 'What safeguards are in place to ensure data integrity during this transition?' Which statement best describes the appropriate approach?
A dual-write strategy provides the strongest guarantee of data integrity during a database migration. This involves writing to both the old and new databases concurrently until synchronization is complete – ensuring no data loss or inconsistencies. Deleting and rebuilding indexes alone isn't sufficient for critical systems.
14 / 14
You are reviewing a code snippet that implements a database operation to transfer funds between two accounts. The code includes error handling but lacks explicit rollback logic. A senior engineer asks: 'How do we ensure atomicity in this transaction?' Which of the following best describes the correct approach?
Database transactions provide atomicity – guaranteeing that either all operations within the transaction succeed or none do. Isolation levels further protect against concurrent access issues. Retrying is not reliable due to potential cascading failures; manual intervention introduces complexity and risk.
What will I practise in "Database Discussions: Query, Schema & Migration Phrases"?
This module focuses on Phrasebook — real workplace phrasing you'll use on the job. It contains 14 scenario-based multiple-choice questions with instant feedback.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account or sign-up required.
How many questions does this exercise have?
This module includes 14 questions. Each one gives an immediate right/wrong result plus a full explanation of the correct phrasing.
What happens if I answer a question incorrectly?
You'll see the correct answer highlighted straight away, along with a plain-English explanation of why it's right and why the other options don't fit — mistakes are part of the learning here.
Can I retry the exercise if I want a better score?
Yes — use the 'Try again' button on the results screen to reset your score and go through the questions again. There's no limit on attempts.
Who is this Phrasebook exercise for?
It's aimed at IT professionals with working English who want to sound more natural and precise around phrasebook — useful whether you're preparing for real conversations at work or just building confidence with the vocabulary.
Do I need an account to track my progress?
No account is needed. Your progress through the exercise is tracked locally in your browser for the current session, and you can replay the module at any time.
How is this different from reading a blog article?
This exercise is an interactive drill that tests and reinforces specific phrasing through multiple-choice questions with instant feedback, while blog articles explain concepts and vocabulary in prose. The two work well together.
Where can I find more Phrasebook exercises?
See the Phrasebook hub for more modules like this one, or browse the full Exercises page for other IT-English topics.
Can I complete this exercise on my phone?
Yes — every exercise on CoderSlingo is fully responsive and works on phones and tablets, so you can practise anywhere.