MCQ on distributed and parallel database concepts, Interview questions with answers in distributed database
Distribute and Parallel Database – Quiz
1. When a
participating site S1 decides to commit the transaction T
upon receiving the <prepare T> message from the coordinator, it sends _____
message to the coordinator site.
a) <prepare
T>
b) <commit T>
c) <ready T>
d) <abort T>
Answer: (c)
According to two
phase commit protocol, if a site is ready for committing a transaction which
was already initiated by a coordinator with a <prepare T>
message, it will write a <ready T> message into its log,
store in its stable storage and send the same to the coordinator site.
|
2. Why in two phase commit protocol does a participating site first write the decision in its log file before communicating it with the coordinator site?
a) to decide the fate of the transaction if a failure happens
b) to send the all
the decisions at once to the coordinator site to reduce the cost.
c) both (a) and (b)
d) neither (a) nor
(b)
Answer: (a)
The participant
must be able to tell the difference between a crash/failure that occurred
before it voted ‘ready’ to Commit from a failure that occurred after it voted
‘ready’ to commit. If on recovery, the participant finds ‘Prepared’ in its
log, it knows it voted in favour of committing the transaction, but it does
not know the final decision. So it must inquire the Coordinator. If the
decision from the Coordinator is to abort, then the participant aborts and
rolls-back its sub-transaction.
|
3. In two-phase commit (2PC) protocol, who can cause a transaction to abort?
a) Coordinator
b) Participating
site
c) Both coordinator and participating site
d) Third party site
Answer: (c)
In 2PC, both the coordinator site and the participating site can cause a transaction to abort.
How participating
site can do? - If a participating site is not ready to commit a transaction
T, then it writes <abort T> in its log file and communicate the same to
the coordinator site.
How a coordinator
site can do? – If any of the participating sites is not ready to commit, then
coordinator decides not to commit and intimate the same to other
participating sites.
|
4. To increase the throughput and response time of the system especially when there are lots of smaller queries, which type of parallelism is most likely to perform better?
a) Intra-query
parallelism
b) Inter-query parallelism
c) Inter-operation
parallelism
d) Intra-operation
parallelism
Answer: (b)
Small queries do
not consume much time of the CPU. Inter-query parallelism is a form of parallelism
where many different Queries or Transactions are executed in parallel with
one another on many processors. It also increases the number of transactions
executed in a given time.
|
5. Which of the following helps in implementing inter-operation parallelism?
a) Interdependent
parallelism
b) Intra-query
parallelism
c) Inter-query
parallelism
d) Pipelined parallelism
Answer: (d)
Inter-operation parallelism is the concept of executing multiple operations of same query in parallel.
The idea behind the
pipelined parallelism is to consume the result produced by one operation by
the next operation in the pipeline.
|
**********
Go to Distributed database quiz home
Go to Advanced DBMS Quizzes home page
Go to Distributed Database home page
sir,can post a page on equivalence transformation too.
ReplyDeleteHi, did you mean equivalence rules for query processing?
Deleteyes sir,equivalence rules for query processing
Delete