Learn. Practice. Feel prepared.
DBMS Objective Questions and Answers
This DBMS quiz contains carefully curated objective questions with correct answers and clear explanations. It is designed for computer science students, backend developers, and interview preparation, focusing on database design, SQL internals, transactions, indexing, and performance tuning.
Practice DBMS MCQs with Detailed Explanations
Answer at least 12 questions to submit and verify answers.
1 Which normal form eliminates transitive dependency? Easy
Correct answer:
3NF
Third Normal Form removes transitive dependencies by ensuring that non-key attributes depend only on the primary key.
2 Which SQL clause is evaluated first in query execution? Medium
Correct answer:
FROM
FROM is evaluated first to determine the dataset before applying filtering and projection.
3 Which index structure is best suited for range queries? Medium
Correct answer:
B+ Tree index
B+ Tree indexes maintain sorted order, making them efficient for range-based queries.
4 What anomaly is prevented by 2NF? Medium
Correct answer:
Update anomaly due to partial dependency
Second Normal Form removes partial dependency, preventing update anomalies related to composite keys.
5 Which isolation level allows dirty reads? Medium
Correct answer:
Read Uncommitted
Read Uncommitted allows transactions to read uncommitted changes from other transactions.
6 Which schedule is conflict serializable? High
Correct answer:
Schedule with acyclic precedence graph
A schedule is conflict serializable if its precedence graph is acyclic.
7 What is the main purpose of a checkpoint in recovery? Medium
Correct answer:
Reduce recovery time
Checkpointing reduces recovery time by limiting how far the log needs to be scanned.
8 Which join algorithm is most efficient when one relation fits entirely in memory? Medium
Correct answer:
Nested loop join
If one relation fits in memory, nested loop join becomes efficient due to minimal disk I/O.
9 Which condition causes a deadlock? Medium
Correct answer:
Circular wait
Deadlock requires circular wait among transactions holding and requesting locks.
10 Which operation cannot be performed on a view without INSTEAD OF trigger? Medium
Correct answer:
UPDATE on complex joins
Updates on complex join-based views require INSTEAD OF triggers.
11 Which locking protocol guarantees conflict serializability? High
Correct answer:
Two-phase locking
Two-phase locking ensures serializability by separating lock acquisition and release phases.
12 Which normal form is stricter than 3NF? Medium
Correct answer:
BCNF
BCNF removes anomalies not handled by 3NF when multiple candidate keys exist.
13 What is the output of COUNT(column) when all values are NULL? Medium
Correct answer:
0
COUNT(column) ignores NULL values, so it returns zero.
14 Which index consumes the least storage? Medium
Correct answer:
Sparse index
Sparse indexes store index entries only for some records, reducing storage.
15 What does WAL ensure? High
Correct answer:
Atomicity and Durability
Write-Ahead Logging ensures changes are logged before being written to disk, supporting atomicity and durability.