SQL & DBMS interview questions and quick answers
Joins, keys, normalisation, indexes and transactions for placement and backend interviews.
Review 957 questions and short answers on SQL & DBMS. Start with real examples below, then search, practise and follow links to full explanations.
SQL & DBMS: questions worth revising first
These answers come from AI Tapri's existing question bank and published interview guides. Open each answer and read the linked in-depth guide for examples and context.
01What are the ACID properties of a transaction?
ACID stands for Atomicity, Consistency, Isolation and Durability. A transaction either fully happens or not at all, leaves the data valid according to its rules, behaves as if it ran without interference from other transactions, and stays saved once committed, even if the server crashes.
Read the full explanation02Why can't you use a column alias in the WHERE clause?
WHERE runs before SELECT, so the alias does not exist yet when the filter is evaluated. Repeat the expression, or put the query in a subquery or CTE and filter outside.
Read the full explanation03What is autocommit and how does it affect transactions?
In autocommit mode every SQL statement is its own transaction and is committed as soon as it succeeds. To group statements into one atomic unit, start an explicit transaction with BEGIN or turn autocommit off.
Read the full explanation04What is BCNF and how is it stricter than 3NF?
A table is in BCNF if, for every non-trivial dependency X -> Y, X is a superkey. 3NF also lets Y be a prime attribute, which BCNF does not allow, so BCNF removes a few anomalies that 3NF misses.
Read the full explanation05What do the NOT NULL, DEFAULT and CHECK constraints do?
NOT NULL forbids missing values, DEFAULT supplies a value when none is given on insert, and CHECK rejects rows whose values fail a condition. Together they keep bad data out at the database level.
Read the full explanation06What is the difference between a clustered and a non-clustered index?
A clustered index decides the physical order in which table rows are stored, so the table itself is the index and there can be only one. A non-clustered index is a separate structure holding the indexed values plus a pointer back to the row, and a table can have many.
Read the full explanation07What is a common pitfall related to "What are the ACID properties of a transaction"?
Mixing up ACID consistency with "consistency" in distributed systems (the C in CAP). In ACID it means the data obeys its rules; in CAP it means every node sees the same latest data.
Read the full explanation08Where is "What are the ACID properties of a transaction" useful in practice?
Banking and UPI transfers: debit and credit must succeed together.
Read the full explanationFind your next answer.
Pick a topic, search a keyword, or open a question to reveal the answer.
SQL & DBMS quick answers
Free to practise. No account needed. Made for quick revision, not rote memorisation.
Keep preparing for SQL & DBMS
Quick answers help with recall; detailed guides explain the reasoning, examples and common mistakes behind each answer.