0% found this document useful (0 votes)
3 views4 pages

DDBMS A2

The document discusses Distributed Query Optimization (DQO), which involves optimizing queries at global and local levels in a distributed database system, focusing on factors like communication cost and data location. It also explains the transaction concept based on ACID properties—Atomicity, Consistency, Isolation, and Durability—and highlights the importance of reliability in DBMSs, including issues like hardware failures and human errors. Lastly, it covers Parallel Query Processing (PQP) and its optimization, emphasizing the need for load balancing, communication overhead reduction, and effective data partitioning.

Uploaded by

sahilsaurav8765
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

DDBMS A2

The document discusses Distributed Query Optimization (DQO), which involves optimizing queries at global and local levels in a distributed database system, focusing on factors like communication cost and data location. It also explains the transaction concept based on ACID properties—Atomicity, Consistency, Isolation, and Durability—and highlights the importance of reliability in DBMSs, including issues like hardware failures and human errors. Lastly, it covers Parallel Query Processing (PQP) and its optimization, emphasizing the need for load balancing, communication overhead reduction, and effective data partitioning.

Uploaded by

sahilsaurav8765
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment -2

Q1.Explain Distributed Query Optimization.


Ans-Distributed Query Optimization is a process that involves optimizing
queries at both the global and local levels in a distributed database
system. When a query enters the database system at the client or
controlling site, it is validated, checked, translated, and optimized at a
global level.
The architecture of distributed query processing can be represented as
mapping global queries into local queries. The process of mapping global
queries to local ones can be realized by gathering information about the
distribution and reconstructing the global view from the fragments. If
there is no replication, the global optimizer runs local queries at the sites
where the fragments are stored. If there is replication, the global optimizer
selects the site based upon communication cost, workload, and server
speed. The global optimizer generates a distributed execution plan so that
least amount of data transfer occurs across the sites. The plan states the
location of the fragments, order in which query steps needs to be executed
and the processes involved in transferring intermediate results. The local
queries are optimized by the local database servers. Finally, the local query
results are merged together through union operation in case of horizontal
fragments and join operation for vertical fragments
DQO algorithms typically consider the following factors when generating
an execution plan:
 The cost of local processing at each site.
 The cost of communication between sites.
 The location of the data needed to execute the query.
 The degree of data replication and fragmentation.
Q2.Explain the transaction concept & Characteristics of transaction.
Ans- A transaction can be defined as a group of tasks. A single task is the
minimum processing unit which cannot be divided further.
Let’s take an example of a simple transaction. Suppose a bank employee
transfers Rs 500 from A's account to B's account. This very simple and
small transaction involves several low-level tasks.
A’s Account
Open_Account(A)
Old_Balance = A.balance
New_Balance = Old_Balance - 500
A.balance = New_Balance
Close_Account(A)
B’s Account
Open_Account(B)
Old_Balance = B.balance
New_Balance = Old_Balance + 500
B.balance = New_Balance
Close_Account(B)
The transaction concept is based on the ACID properties, which stands for
Atomicity, Consistency, Isolation, and Durability.
1. Atomicity: Atomicity ensures that a transaction is treated as a single,
indivisible unit of work. Either all the operations within the
transaction are completed successfully, or none of them are. If any
part of the transaction fails, the entire transaction is rolled back to its
original state, ensuring data consistency and integrity.
2. Consistency: Consistency ensures that a transaction takes the
database from one consistent state to another consistent state. The
database is in a consistent state both before and after the transaction
is executed. Constraints, such as unique keys and foreign keys, must
be maintained to ensure data consistency.
3. Isolation: Isolation ensures that multiple transactions can execute
concurrently without interfering with each other. Each transaction
must be isolated from other transactions until it is completed. This
isolation prevents dirty reads, non-repeatable reads, and phantom
reads.
4. Durability: Durability ensures that once a transaction is committed,
its changes are permanent and will survive any subsequent system
failures. The transaction’s changes are saved to the database
permanently, and even if the system crashes, the changes remain
intact and can be recovered.
Q3.What is RELIABILITY? Explain reliability issues in DBMSs.
Ans- Reliability in a database management system (DBMS) refers to the
ability of the system to perform consistently and without errors. This
means that the database must be available when needed, and the data
must be accurate and complete.
Reliability is important in DBMSs because they are often used to store
critical data that is essential for business operations. For example, a bank's
DBMS might store customer account information, transaction history, and
other sensitive data. If the DBMS is not reliable, the bank could lose
money, damage its reputation, and even face legal penalties.
There are a number of factors that can contribute to reliability issues in
DBMSs, including:
 Hardware failures: Hardware components such as disk drives,
memory, and CPUs can fail, which can lead to downtime and data
loss.
 Software bugs: Software bugs in the DBMS itself or in applications
that use the DBMS can cause errors and data corruption.
 Human errors: Human errors, such as accidental data deletion or
incorrect configuration changes, can also lead to reliability problems.
 Security breaches: Security breaches can allow unauthorized users to
access, modify, or delete data, which can also impact reliability.
Q4.Explain Parallel query processing & Optimization.
Ans- Parallel query processing (PQP) is a technique for executing database
queries on multiple processors simultaneously. This can significantly
improve the performance of queries, especially for large and complex
queries.
There are two main types of PQP:
 Intra-query parallelism: This type of PQP involves dividing a single
query into multiple subqueries, which are then executed in parallel
on different processors.
 Inter-query parallelism: This type of PQP involves executing multiple
queries in parallel on different processors. This can be useful for
improving the overall throughput of the system, especially when
there are many concurrent users.
Parallel query optimization is the process of selecting the best parallel
execution plan for a query. This involves considering factors such as the
availability of resources, the type of query, and the characteristics of the
data. A parallel query optimizer typically generates multiple candidate
execution plans and then selects the one that is estimated to have the best
performance. Parallel query optimization is a complex process, but it is
essential for achieving good performance on parallel database systems.
The following are some of the key challenges that need to be addressed in
parallel query optimization:
 Load balancing: The optimizer needs to distribute the workload
evenly across the available processors or nodes.
 Communication overhead: The optimizer needs to minimize the
amount of communication required between the different processors
or nodes.
 Data partitioning: The optimizer needs to choose an effective data
partitioning scheme.
 Resource scheduling: The optimizer needs to schedule the execution
of the operators in a way that minimizes the overall execution time.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy