MCQ Collection
Advance Database Management Systems MCQs
Practice Advance Database Management Systems questions with answers and explanations.
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 database creates an index automatically
B.
a transaction commits successfully after reading
C.
two or more transactions wait for each other so none can proceed
D.
a query chooses a full table scan
Show Answer
Correct Answer: C. two or more transactions wait for each other so none can proceed
Explanation:
deadlock is used in Advanced DBMS because two or more transactions wait for each other so none can proceed.
Choose an option to check your answer.
A.
data pages are always written before log records
B.
log records are written to stable storage before the corresponding data pages are written
C.
logs are used only for user authentication
D.
logs are deleted before commit
Show Answer
Correct Answer: B. log records are written to stable storage before the corresponding data pages are written
Explanation:
This statement is correct because write-ahead logging means that log records are written to stable storage before the corresponding data pages are written.
Choose an option to check your answer.
A.
a table row number visible to all users
B.
a name of a stored procedure parameter
C.
a fixed password for database administrators
D.
a unique increasing identifier used to order log records and relate pages to logs
Show Answer
Correct Answer: D. a unique increasing identifier used to order log records and relate pages to logs
Explanation:
The correct answer explains log sequence number in the context of Recovery.
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 chooses a full table scan
B.
two or more transactions wait for each other so none can proceed
C.
a transaction commits successfully after reading
D.
a database creates an index automatically
Show Answer
Correct Answer: B. two or more transactions wait for each other so none can proceed
Explanation:
This statement is correct because deadlock means that two or more transactions wait for each other so none can proceed.
Choose an option to check your answer.
A.
a password reset operation
B.
a MongoDB collection validator only
C.
a recovery point that reduces the amount of log scanning after a crash
D.
a type of B-tree split
Show Answer
Correct Answer: C. a recovery point that reduces the amount of log scanning after a crash
Explanation:
The correct answer explains checkpoint in the context of Recovery.
Choose an option to check your answer.
A.
a name of a stored procedure parameter
B.
a unique increasing identifier used to order log records and relate pages to logs
C.
a table row number visible to all users
D.
a fixed password for database administrators
Show Answer
Correct Answer: B. a unique increasing identifier used to order log records and relate pages to logs
Explanation:
log sequence number is used in Advanced DBMS because a unique increasing identifier used to order log records and relate pages to logs.
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 method used only for file compression
B.
a strategy that never uses timestamps
C.
a method that deletes all waiting transactions randomly
D.
a strategy that avoids deadlocks before they occur using rules such as wait-die or wound-wait
Show Answer
Correct Answer: D. a strategy that avoids deadlocks before they occur using rules such as wait-die or wound-wait
Explanation:
The correct answer explains deadlock prevention in the context of Concurrency Control.
Choose an option to check your answer.
A.
a type of B-tree split
B.
a password reset operation
C.
a recovery point that reduces the amount of log scanning after a crash
D.
a MongoDB collection validator only
Show Answer
Correct Answer: C. a recovery point that reduces the amount of log scanning after a crash
Explanation:
checkpoint is used in Advanced DBMS because a recovery point that reduces the amount of log scanning after a crash.
Choose an option to check your answer.
A.
a transaction has a growing phase for acquiring locks and a shrinking phase for releasing locks
B.
all transactions execute without locks
C.
locks are used only for backup files
D.
locks are acquired and released randomly
Show Answer
Correct Answer: A. a transaction has a growing phase for acquiring locks and a shrinking phase for releasing locks
Explanation:
The correct answer explains two-phase locking in the context of Concurrency Control.