Dbms Important MCQ
Dbms Important MCQ
Dbms Important MCQ
DEAD LOCK
1. A system is in a ______ state if there exists a set of transactions such that every transaction in the set is
waiting for another transaction in the set.
a) Idle
b) Waiting
c) Deadlock
d) Ready
View Answer
Answer:c
Explanation:When one data item is waiting for another data item in a transaction then system is in deadlock.
2. The deadlock state can be changed back to stable state by using _____________ statement.
a) Commit
b) Rollback
c) Savepoint
d) Deadlock
View Answer
Answer:b
Explanation:Rollback is used to rollback to the point before lock is obtained.
3. What are the ways of dealing with deadlock ?
a) Deadlock prevention
b) Deadlock recovery
c) Deadlock detection
d) All of the mentioned
View Answer
Answer:d
Explanation:Deadlock prevention is also called as deadlock recovery.Prevention is commonly used if the
probability that the system would enter a deadlock state is relatively high; otherwise, detection and recovery are
more efficient.
4. When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp
smaller than that of Tj (that is, Ti is older than Tj ). Otherwise, Ti is rolled back (dies). This is
a) Wait-die
b) Wait-wound
c) Wound-wait
d) Wait
View Answer
Answer:a
Explanation:The wait–die scheme is a non-preemptive technique.
5. When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp
larger than that of Tj (that is, Ti is younger than Tj ). Otherwise, Tj is rolled back (Tj is wounded by Ti ). This is
a) Wait-die
b) Wait-wound
c) Wound-wait
Answer:b
Explanation:In total rollback abort the transaction and then restart it.
RELATIONAL ALGEBRA
This set of Database Questions & Answers focuses on “Relational Algebra”
1. Relational Algebra is a __________ query language that takes two relation as input and produces another
relation as output of the query.
a) Relational
b) Structural
c) Procedural
d) Fundamental
View Answer
Answer:c
Explanation:This language has fundamental and other operations which are used on relations.
2. Which of the following is a fundamental operation in relational algebra ?
a) Set intersection
b) Natural join
c) Assignment
d) None of the mentioned
View Answer
Answer:d
Explanation:The fundamental operations are select, project, union, set difference, Cartesian product, and
rename.
3. Which of the following is used to denote the selection operation in relational algebra ?
a) Pi (Greek)
b) Sigma (Greek)
c) Lambda (Greek)
d) Omega (Greek)
View Answer
Answer:b
Explanation:The select operation selects tuples that satisfy a given predicate.
4. For select operation the ________ appear in the subscript and the ___________ argument appears in the
paranthesis after the sigma.
a) Predicates, relation
b) Relation, Predicates
c) Operation, Predicates
d) Relation, Operation
View Answer
Answer:a
Explanation:None.
5. The ___________ operation, denoted by −, allows us to find tuples that are in one relation but are not in
another.
a) Union
b) Set-difference
c) Difference
abcd
efgh
ijkl
mnop