Distributeddbms Er. Inderjeet Bal
Distributeddbms Er. Inderjeet Bal
Distributed DBMS.
Software system that permits the
management of the distributed database and
makes the distribution transparent to users.
Concepts
Collection of logically-related shared data.
Data split into fragments.
Fragments may be replicated.
Fragments/replicas allocated to sites.
Sites linked by a communications network.
Data at each site is under control of a DBMS.
DBMSs handle local applications autonomously.
Each DBMS participates in at least one global
application.
Distributed Processing and Distributed Databases
Distributed processing does not require a
distributed database, but a distributed
database requires distributed processing
Distributed processing may be based on a
single database located on a single computer
For the management of distributed data to
occur, copies or parts of the database
processing functions must be distributed to all
data storage sites
Both distributed processing and distributed
databases require a network of
interconnected components
Characteristics of Distributed Management Systems
Application interface to interact with the end user,
application programs and other DBMSs within the
distributed database
Validation to analyze data requests for syntax
correctness
Transformation to decompose complex requests into
atomic data request components
Query optimization to find the best access strategy
Mapping to determine the data location of local and
remote fragments
I/O interface to read or write data from or to
permanent local storage
Characteristics of Distributed Management Systems (cont’d.)
DC LDBMS
GDD
Computer Network
DDBMS
DC
site 2 DB
9
Advantages of DDBMSs
Organizational Structure
Shareability and Local Autonomy
Improved Availability
Improved Reliability
Improved Performance
Economics
Modular Growth
Disadvantages of DDBMSs
Complexity
Cost
Security
Integrity Control More Difficult
Lack of Standards
Lack of Experience
Database Design More Complex
Types of DDBMS
Homogeneous DDBMS
Heterogeneous DDBMS
Homogeneous DDBMS
All sites use same DBMS product.
Identical DBMSs
Heterogeneous DDBMS
Sites may run different DBMS products, with
possibly different underlying data models.
Occurs when sites have implemented their own
databases and integration is considered later.
Translations required to allow for:
Different hardware.
Different DBMS products.
Different hardware and different DBMS products.
Typical solution is to use gateways.
Heterogeneous Environment
Non-identical DBMSs
Open Database Access and Interoperability
Open Group has formed a Working Group to
provide specifications that will create database
infrastructure environment where there is:
Common SQL API that allows client applications to
be written that do not need to know vendor of
DBMS they are accessing.
Common database protocol that enables DBMS from one
vendor to communicate directly with DBMS from another
vendor without the need for a gateway.
A common network protocol that allows communications
between different DBMSs.
Most ambitious goal is to find a way to enable
transaction to span DBMSs from different vendors
without use of a gateway.
Multidatabase System (MDBS)
DDBMS in which each site maintains complete
autonomy.
DBMS that resides transparently on top of existing
MDBS (FMDBS).
Functions of a DDBMS
Expect DDBMS to have at least the
functionality of a DBMS.
Also to have following functionality:
ANSI/SPARC .
Some levels may be missing, depending on levels of
transparency supported.
Reference Architecture for MDBS
In DDBMS, GCS is union of all local conceptual
schemas.
In FMDBS, GCS is subset of local conceptual
25
Distributed Database Design
Three key issues:
Fragmentation.
Allocation
Replication
Distributed Database Design
Fragmentation
Relation may be divided into a number of sub-
relations, which are then distributed.
Allocation
Each fragment is stored at site with "optimal"
distribution.
Replication
Copy of fragment may be maintained at several
sites.
Fragmentation
Definition and allocation of fragments carried
out strategically to achieve:
Locality of Reference
Improved Performance
Complete Replication
Selective Replication
Data Allocation
Centralized
Partitioned
Selective Replication
centralization.
33
Why Fragment?
Usage
relations.
Efficiency
used.
Data that is not needed by local applications is not
stored.
Why Fragment?
Parallelism
With fragments as unit of distribution, transaction can be
Disadvantages
Performance
Integrity.
Correctness of Fragmentation
Three correctness rules:
Completeness
Reconstruction
Disjointness.
Correctness of Fragmentation
Completeness
Reconstruction
Horizontal
Vertical
Mixed
Derived.
Concurrency Transparency
Failure Transparency
Performance Transparency
DBMS Transparency
Distribution Transparency
Distribution transparency allows user to
perceive database as single, logical entity.
If DDBMS exhibits distribution transparency,
user does not need to know:
data is fragmented (fragmentation
transparency),
location of data items (location transparency),
otherwise call this local mapping transparency.
With replication transparency, user is
unaware of replication of fragments .
Naming Transparency
Each item in a DDB must have a unique
name.
DDBMS must ensure that no two sites create
a database object with same name.
One solution is to create central name server.
However, this results in:
loss of some local autonomy;
central site may become a bottleneck;
low availability; if the central site fails,
remaining sites cannot create any new objects.
Transaction Transparency
Ensures that all distributed transactions
maintain distributed database’s integrity and
consistency.
Distributed transaction accesses data stored at
more than one location.
Each transaction is divided into number of sub-
transactions, one for each site that has to be
accessed.
DDBMS must ensure the indivisibility of both
the global transaction and each
subtransactions.
Concurrency Transparency
All transactions must execute independently
and be logically consistent with results
obtained if transactions executed one at a
time, in some arbitrary serial order.
Same fundamental principles as for
centralized DBMS.
DDBMS must ensure both global and local
transactions do not interfere with each other.
Similarly, DDBMS must ensure consistency of
all sub-transactions of global transaction.
Concurrency Transparency
Replication makes concurrency more
complex.
If a copy of a replicated data item is updated,
update must be propagated to all copies.
Could propagate changes as part of original
transaction, making it an atomic operation.
However, if one site holding copy is not
reachable, then transaction is delayed until
site is reachable.
Concurrency Transparency
Could limit update propagation to only those
sites currently available. Remaining sites
updated when they become available again.
Could allow updates to copies to happen
asynchronously, sometime after the original
update. Delay in regaining consistency may
range from a few seconds to several hours.
Failure Transparency
DDBMS must ensure atomicity and durability
of global transaction.
Means ensuring that sub-transactions of global
transaction either all commit or all abort.
Thus, DDBMS must synchronize global
transaction to ensure that all sub-transactions
have completed successfully before recording a
final COMMIT for global transaction.
Must do this in presence of site and network
failures.
Performance Transparency
DDBMS must perform as if it were a
centralized DBMS.
DDBMS should not suffer any performance
degradation due to distributed architecture.
DDBMS should determine most cost-effective
strategy to execute a request.
Performance Transparency
Distributed Query Processor (DQP) maps
data request into ordered sequence of
operations on local databases.
Must consider fragmentation, replication,
and allocation schemas.
DQP has to decide:
which fragment to access;
which copy of a fragment to use;
which location to use.
Performance Transparency
DQP produces execution strategy optimized
with respect to some cost function.
Typically, costs associated with a distributed
request include:
I/O cost;
CPU cost;
communication cost.
Thanks