Thursday, April 30, 2020

DBMS Quiz Questions with Answers 09

Database management systems DBMS TRUE or FALSE questions with answers explained for competitive and entrance exams.


TRUE or FALSE questions in DBMS 


1. Secondary indexes are always dense.
                   (a) TRUE                                          (b) FALSE
View Answer

Answer: TRUE
Secondary indices must be dense, with an index entry for every search-key value, and a pointer to every record in the file. If a secondary index stores only some of the search-key values, records with intermediate search-key values may be anywhere in the file and, in general, we cannot find them without searching the entire file.

2. Dynamic hash tables support range queries.
                   (a) TRUE                                          (b) FALSE
View Answer

Answer: FALSE
Hashing is not good for range queries. They are good for point queries.
Dynamic hashing techniques allow the hash function to be modified dynamically
to accommodate the growth or shrinkage of the database.

3. In undo logging, it is not always possible to recover some consistent state of a database system if the system crashes during recovery.
                   (a) TRUE                                          (b) FALSE
View Answer

Answer: FALSE
It is possible to recover some consistent state of a database system if the system crashes during recovery. For example, ARIES algorithm can recover consistent state of a database system if the system crashes for the second time during recovery.

4. A scheduler based on the two-phase locking scheme always executes multiple transactions with some serial schedule.
                   (a) TRUE                                          (b) FALSE
View Answer

Answer: FALSE
2PL can execute multiple transactions with some serial schedule. But it may not happen always. For example, deadlocks may happen under 2PL. In this case, the schedule cannot be executed without choosing a victim. Also, in some cases, cascading rollbacks can happen.

5. Two-phase locking prevents deadlocks.
                   (a) TRUE                                          (b) FALSE
View Answer

Answer: FALSE
No. In 2PL, deadlock may happen if cyclic lock was acquired. For example, let us assume a schedule S with two transactions T1 and T2. Both T1 and T2 need two data items A and B to complete the transaction. During the growing phase of 2PL, let us suppose that T1 acquired an exclusive lock on A and at the same time T2 acquired a lock on B. Now, to complete the transaction successfully, either T1 or T2 has to release the locks held by them. This situation is deadlock and this can happen in 2PL.

**********************

Related links:




No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery