Showing posts with label Distributed Database Question Bank. Show all posts
Showing posts with label Distributed Database Question Bank. Show all posts

Friday, May 1, 2020

Distributed Database Question Bank with Answers 04



Question:

When and why is replication favorable in a distributed database?


Answer:
Replication will speed up data access for data that is seldom updated.
Replication is favorable when the update frequency is low since the DDBMS must otherwise use a lot of resources to keep the different copies of the database up-to-date. For example, in a replicated database this would mean that all updates to the one replicated table would have to be propagated to each distributed node. On the other hand replication is very good for read-only databases since then only local accesses would be needed.


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

Related Questions:

Distributed Database Question Bank with Answers 03



Question:

Describe the main advantage of pipelined parallelism and some of its drawbacks.


Answer:
Advantage: 
There is no need to write intermediate relations to disk, only to read them back immediately.
Disadvantages:
a. Cannot take advantage of high degrees of parallelism, as typical queries do not have large number of operations.
b. Not possible to pipeline operators which need to look at all the input before producing any output. Examples are the Aggregate and the Sort operators.
c. Since each operation executes on a single processor, the most complex ones take a long time to finish. Thus speed-up will be low in spite of parallelism

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

Related Questions:


what are the major disadvantages of pipelined parallelism

list some advantages of piplined parallelism in distributed database

Distributed Database Question Bank with Answers 02



Question:

List two ways to measure the time improvement when processing a query using parallel architecture? Why is linearity important?


Answer:

  1. Speed up: the time required in the original setting/ the time required in the new parallel setting 
  2. Scale up: the time required in the original setting for a small problem / the time required in the new parallel setting for a similar but larger problem.
These two can be different because not all small problems can be easily made parallel.
Linearity in speed up/scale up is important since it means we are getting a corresponding return on the investment: increasing the number of cores decreases correspondingly the processing time, so the system can be grown incrementally.
Linear speed up: The same workload can be executed in half the time (at twice the speed) if the amount of hardware (e.g. cores) is doubled.
As for linear scale up, we can have linear scale up with respect to our data (relations/DB) or the number of transactions. These are known respectively as linear data scale up and linear transaction scale up:
Linear data scale up: The same level of performance can be maintained on a database twice the size of the original database provided the amount of hardware (e.g. cores) is also doubled. This is also known sometimes as linear batch scale up.
Linear transaction scale up: The same level of performance can be maintained when the number of arriving transactions is doubled provided the amount of hardware (e.g. cores) is also doubled.

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

Related Questions:

 

why speed up is important in parallel database architecture

why scale up is important in parallel database architecture

questions and answers on linear speed up and linear scale up in parallel database architecture


Distributed Database Question Bank with Answers 06


Question:

Compare and analyze the relative merits of centralized and hierarchical deadlock detection approaches in a distributed DBMS.


Answer:

A centralized deadlock detection scheme is a reasonable choice if the concurrent control algorithm is also centralized. It is better for distributed access patterns across sites since deadlocks occurring between any can be immediately identified. However, this benefit comes at the cost of communications between the central location and every other site. 
In hierarchical deadlock detection algorithms, sites are arranged hierarchically, and a site detects deadlocks involving only its descendant sites. To efficiently detect deadlocks, hierarchical algorithms exploit access patterns local to a cluster of sites. They tend to get the best of both worlds: they have no single point of failure (as centralized algorithms have), and a site is not bogged down by deadlock detection activities that it is not concerned with (as sometimes happens in distributed algorithms). For efficiency, most deadlocks should be localized to as few clusters as possible; the objective of hierarchical algorithms will be defeated if most deadlocks span several clusters.
A hierarchical deadlock detection scheme releases the burden of one single site for deadlock detection, and let more sites get involved. When access patterns are more localized, perhaps by geographic area, they may likely occur among certain sites with frequent communications. The hierarchical approach is more efficient in that it checks for deadlocks where they most likely happen, the hierarchical scheme splits deadlock detection efforts, thus resulting in greater efficiency.

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

Related Questions:


What are the merits of centralized deadlock detection approach in distributed database

What are the merits of hierarchical deadlock detection approach in distributed database

How does hierarchical deadlock detection work in distributed database

Question and answers on distributed deadlock detection approaches


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