ch6 Distributed Database
ch6 Distributed Database
Chapter 6:
Distributed Databases and
Client-Server Architectures
2022
Assosa, Ethiopia
Outline
Distributed Database Concepts
Data Fragmentation, Replication and Allocation
Types of Distributed Database Systems
Concurrency Control and Recovery
Client-Server Architecture
2
Distributed Database Concepts
3
Distributed Database System
Advantages
Management of distributed data with different levels
of transparency:
This refers to the physical placement of data (files,
relations, etc.) which is not known to the user
(distribution transparency).
4
Distributed Database System(cont…)
Advantages (cont…)
Distribution and Network transparency:
network
There is Location transparency, which refers to
better availability.
Makes the user unaware of the existence of copies
Fragmentation transparency:
5
Distributed Database System(cont…)
Advantages (cont...)
Increased reliability and availability:
Reliability refers to system life time; that is, system
is running efficiently most of the time
Availability is the probability that the system is
continuously available (usable or accessible) during
a time interval
A distributed database system has multiple nodes
(computers) and if one fails then others are
available to do the job.
6
Distributed Database System(cont…)
Other Advantages (cont…)
Improved performance:
A distributed DBMS fragments the database to keep
data closer to where it is needed most
This reduces data management overhead (access
and modification time) significantly
Easier expansion (scalability):
Refers to expansion of the system in terms of
adding more data, increasing database sizes or
adding more processors
7
Data Fragmentation, Replication and Allocation
Data Fragmentation
Split a relation into logically related and correct parts. A
= 5). All tuples that satisfy this condition will create a subset
which will be a horizontal fragment of Employee relation.
A selection condition may be composed of several conditions
connected by AND / OR
8
Data Fragmentation, Replication and
Allocation(cont…)
Vertical fragmentation
It is a subset of a relation which is created by a subset of
columns.
Thus a vertical fragment of a relation will contain values of
selected columns. There is no selection condition used in
vertical fragmentation.
Consider the Employee relation. A vertical fragment can be
created by keeping the values of Name, Bdate, Sex, and
Address.
Because there is no condition for creating a vertical fragment,
each fragment must include the primary key attribute of the
parent relation Employee.
In this way all vertical fragments of a relation are connected.
9
Data Fragmentation, Replication and
Allocation(cont…)
10
Data Fragmentation, Replication and
Allocation(cont…)
Data Replication
Replication refers to the distribution of whole or part of
11
Types of Distributed Database Systems
Homogeneous
All sites of the database
system have identical Window
setup, i.e., same database Site 5 Unix
Oracle Site 1
system software. Oracle
For example, all sites run Window
Oracle or DB2, or Sybase Site 4 Communications
network
or some other but the
same database system Oracle
software.
Site 3 Site 2
The underlying operating Linux Oracle Linux Oracle
systems may be different
(can be a mixture of Linux,
Window, Unix, etc.)
12
Types of Distributed Database Systems
Heterogeneous
Federated: Each site may run different database
system but the data access is managed through a
single conceptual schema.
Multidatabase: There is no one conceptual global
schema. For data access a schema is constructed
dynamically as needed by the application software.
Network
Object DBMS
Oriented Site 3 Site 2 Relational
Linux Linux
13
Concurrency Control and Recovery
Distributed Databases encounter a number of
concurrency control and recovery problems which
are not present in centralized databases.
Some of these problems are listed below:
Dealing with multiple copies of data items
Failure of individual sites
Communication link failure
Distributed commit
Distributed deadlock
14
Concurrency Control and Recovery (cont…)
Details
Dealing with multiple copies of data items:
The concurrency control must maintain global
consistency
Likewise, the recovery mechanism must recover all
copies and maintain consistency after recovery
Failure of individual sites:
Database availability must not be affected due to
the failure of one or two sites and the recovery
scheme must recover them before they are
available for use.
15
Concurrency Control and Recovery (cont…)
(Details….)
Communication link failure:
This failure may create network partition which would
Site 3 Site 2
17
Concurrency Control and Recovery
Transaction management:
Concurrency control and commit are managed by
this site
All locks are kept at that site and all requests for
locking or unlocking are sent there
In two phase locking, this site manages locking and
releasing of data items
18
Concurrency Control and Recovery (cont…)
Advantages:
Data items are locked only at one site but they can be
inaccessible
Primary site with backup site
To aid recovery, a backup site is designated which
19
Concurrency Control and Recovery
Recovery from a coordinator failure
In both approaches, a coordinator site or copy may become
unavailable. This will require the selection of a new
coordinator.
Primary site approach with no backup site:
Aborts and restarts all active transactions at all sites. Elects
a new coordinator and initiates transaction processing.
Primary site approach with backup site:
Suspends all active transactions, designates the backup
site as the primary site and identifies a new back up site.
Primary site receives all transaction management
information to resume processing.
Primary and backup sites fail or no backup site:
Use election process to select a new coordinator site.
20
Distributed Database Architectures
Parallel Database management system
Distributed database management system
21
Parallel DBMS
Machines are physically close to each other, e.g.,
same server room
Machines connects with dedicated high-speed
LANs and switches
Communication cost is assumed to be small
Can shared-memory, shared-disk, or shared-
nothing architecture
22
DDBMS Architecture
23
Three-tier Client-Server Arcitecture
24
Thank you
25