Practice Library
All MCQs
Browse exam-wise, subject-wise, and country-wise MCQs with explanations.
Choose an option to check your answer.
A.
a query plan changes after compilation only
B.
a transaction reads an uncommitted value in the same row
C.
a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows
D.
a user cannot find a table in the catalog
Show Answer
Correct Answer: C. a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows
Explanation:
This statement is correct because phantom read means that a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows.
Choose an option to check your answer.
A.
a query plan changes after compilation only
B.
a user cannot find a table in the catalog
C.
a transaction reads an uncommitted value in the same row
D.
a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows
Show Answer
Correct Answer: D. a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows
Explanation:
phantom read is used in Advanced DBMS because a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows.
Choose an option to check your answer.
A.
a query plan changes after compilation only
B.
a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows
C.
a user cannot find a table in the catalog
D.
a transaction reads an uncommitted value in the same row
Show Answer
Correct Answer: B. a repeated predicate query returns additional or missing rows because another transaction inserted or deleted matching rows
Explanation:
The correct answer explains phantom read in the context of Concurrency Control.
Choose an option to check your answer.
A.
a backup reads all files twice
B.
a transaction reads the same row twice and gets different values due to another committed update
C.
a view reads all columns from a base table
D.
a transaction reads a row that never existed
Show Answer
Correct Answer: B. a transaction reads the same row twice and gets different values due to another committed update
Explanation:
This statement is correct because non-repeatable read means that a transaction reads the same row twice and gets different values due to another committed update.
Choose an option to check your answer.
A.
a view reads all columns from a base table
B.
a backup reads all files twice
C.
a transaction reads the same row twice and gets different values due to another committed update
D.
a transaction reads a row that never existed
Show Answer
Correct Answer: C. a transaction reads the same row twice and gets different values due to another committed update
Explanation:
non-repeatable read is used in Advanced DBMS because a transaction reads the same row twice and gets different values due to another committed update.
Choose an option to check your answer.
A.
a transaction reads a row that never existed
B.
a view reads all columns from a base table
C.
a backup reads all files twice
D.
a transaction reads the same row twice and gets different values due to another committed update
Show Answer
Correct Answer: D. a transaction reads the same row twice and gets different values due to another committed update
Explanation:
The correct answer explains non-repeatable read in the context of Concurrency Control.
Choose an option to check your answer.
A.
a transaction reads only archived data
B.
a transaction reads data written by another transaction that has not yet committed
C.
a query reads a materialized view
D.
a user reads data after authentication
Show Answer
Correct Answer: B. a transaction reads data written by another transaction that has not yet committed
Explanation:
This statement is correct because dirty read means that a transaction reads data written by another transaction that has not yet committed.
Choose an option to check your answer.
A.
a transaction reads only archived data
B.
a user reads data after authentication
C.
a transaction reads data written by another transaction that has not yet committed
D.
a query reads a materialized view
Show Answer
Correct Answer: C. a transaction reads data written by another transaction that has not yet committed
Explanation:
dirty read is used in Advanced DBMS because a transaction reads data written by another transaction that has not yet committed.
Choose an option to check your answer.
A.
a user reads data after authentication
B.
a query reads a materialized view
C.
a transaction reads data written by another transaction that has not yet committed
D.
a transaction reads only archived data
Show Answer
Correct Answer: C. a transaction reads data written by another transaction that has not yet committed
Explanation:
The correct answer explains dirty read in the context of Concurrency Control.
Choose an option to check your answer.
A.
a query returns no rows due to selection
B.
a view hides sensitive columns
C.
one transaction overwrites another transaction’s update without proper control
D.
a committed transaction is saved in the log
Show Answer
Correct Answer: C. one transaction overwrites another transaction’s update without proper control
Explanation:
This statement is correct because lost update problem means that one transaction overwrites another transaction’s update without proper control.
Choose an option to check your answer.
A.
one transaction overwrites another transaction’s update without proper control
B.
a view hides sensitive columns
C.
a committed transaction is saved in the log
D.
a query returns no rows due to selection
Show Answer
Correct Answer: A. one transaction overwrites another transaction’s update without proper control
Explanation:
lost update problem is used in Advanced DBMS because one transaction overwrites another transaction’s update without proper control.
Choose an option to check your answer.
A.
one transaction overwrites another transaction’s update without proper control
B.
a query returns no rows due to selection
C.
a committed transaction is saved in the log
D.
a view hides sensitive columns
Show Answer
Correct Answer: A. one transaction overwrites another transaction’s update without proper control
Explanation:
The correct answer explains lost update problem in the context of Concurrency Control.