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 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 lock only for opening database files
B.
a lock required for writing that prevents other conflicting reads or writes
C.
a password policy for administrators
D.
a lock that allows all users to update together
Show Answer
Correct Answer: B. a lock required for writing that prevents other conflicting reads or writes
Explanation:
exclusive lock is used in Advanced DBMS because a lock required for writing that prevents other conflicting reads or writes.
Choose an option to check your answer.
A.
queries are optimized by guessing randomly
B.
transactions are never checked for conflicts
C.
transactions execute first and are validated before commit
D.
all writes require locks before any read
Show Answer
Correct Answer: C. transactions execute first and are validated before commit
Explanation:
This statement is correct because optimistic concurrency control means that transactions execute first and are validated before commit.
Choose an option to check your answer.
A.
a lock mode for range predicates
B.
a recovery technique that keeps old pages unchanged and switches page tables at commit
C.
a query optimization heuristic only
D.
a form of MongoDB indexing
Show Answer
Correct Answer: B. a recovery technique that keeps old pages unchanged and switches page tables at commit
Explanation:
The correct answer explains shadow paging in the context of Recovery.
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 lock that allows all users to update together
B.
a password policy for administrators
C.
a lock only for opening database files
D.
a lock required for writing that prevents other conflicting reads or writes
Show Answer
Correct Answer: D. a lock required for writing that prevents other conflicting reads or writes
Explanation:
This statement is correct because exclusive lock means that a lock required for writing that prevents other conflicting reads or writes.
Choose an option to check your answer.
A.
logs are used only for user authentication
B.
log records are written to stable storage before the corresponding data pages are written
C.
logs are deleted before commit
D.
data pages are always written before log records
Show Answer
Correct Answer: B. log records are written to stable storage before the corresponding data pages are written
Explanation:
The correct answer explains write-ahead logging in the context of Recovery.
Choose an option to check your answer.
A.
a lock mode for range predicates
B.
a recovery technique that keeps old pages unchanged and switches page tables at commit
C.
a query optimization heuristic only
D.
a form of MongoDB indexing
Show Answer
Correct Answer: B. a recovery technique that keeps old pages unchanged and switches page tables at commit
Explanation:
shadow paging is used in Advanced DBMS because a recovery technique that keeps old pages unchanged and switches page tables at commit.
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 database creates an index automatically
B.
two or more transactions wait for each other so none can proceed
C.
a transaction commits successfully after reading
D.
a query chooses a full table scan
Show Answer
Correct Answer: B. two or more transactions wait for each other so none can proceed
Explanation:
The correct answer explains deadlock in the context of Concurrency Control.
Choose an option to check your answer.
A.
log records are written to stable storage before the corresponding data pages are written
B.
logs are deleted before commit
C.
logs are used only for user authentication
D.
data pages are always written before log records
Show Answer
Correct Answer: A. log records are written to stable storage before the corresponding data pages are written
Explanation:
write-ahead logging is used in Advanced DBMS because log records are written to stable storage before the corresponding data pages are written.
Choose an option to check your answer.
A.
a form of MongoDB indexing
B.
a lock mode for range predicates
C.
a recovery technique that keeps old pages unchanged and switches page tables at commit
D.
a query optimization heuristic only
Show Answer
Correct Answer: C. a recovery technique that keeps old pages unchanged and switches page tables at commit
Explanation:
This statement is correct because shadow paging means that a recovery technique that keeps old pages unchanged and switches page tables at commit.