2. Distributed Database
(DDB):
It is comprises of two terms - Distributed Computing
and Database.
Distributed Computing means when multiple
computers are interconnected via some network works
as a single unit to perform the certain task. i.e
Distributed computing systems partitions a big,
unmanageable problem in to smaller pieces and solve
it efficiently in a coordinated manner. They are loosely
coupled. They do not have shared memory concept.
Database is an organised collection of data.
3. Overview
Definition
Difference between parallel and distributed DB
Types of distributed DB
Distributed Data Storage
Replication
Fragmentation
Allocation
Advantages ( Objectives ) of DDB
Disadvantages
4. Definition
Distributed Database(DDB) is defined as a
collection of multiple Logically interrelated database
over a computer network.
Distributed Database Management
System(DDBMS) is defined as a software that
manages a distributed database while making the
distribution transparent to the user. i.e A collection of
files stored at different nodes of a network and the
maintaining of interrelationships among them via
hyperlinks has become a common organisation on the
internet
5. 4
Parallel database Distributed Database
It is a system where multiple
processors or machines are used to
excecute and run queries in parallel.
It is a collection of multiple logically
interrelated database distributed over
a network
The nodes are located at
geographical same location
The nodes are usually located at
geographically different locations.
These are based on shared memory
or shared disk architecture i.e they
either shared a primary or a
secondary (disk)memory or both.
These are based on shared nothing
architecture.i.e every machine has its
own primary or secondary
(disk)memory, no common memory
exists in the mode of operation.
Their excution speed is quiet fast Their execution speed is slow.
They are difficult to expand They are easier to expand.
6. Types of Distributed Database Systems:
Distributed database
systems
Homogeneous Heterogeneous
7. Homogeneous distributed
database system
All sites have identical database management
system software.
All sites are aware of one another, and agree to
cooperate in processing users’ requests.
The operating system, the data structures and the
database application used at each location must be
same or compatible.
This system appears to the user as a single system
and it is much easier to design and manage
8. Heterogeneous distributed
database system
Different sites may use different database
management system software.
The sites may not be aware of one another.
They may provide only limited facilities for
cooperation in transaction processing.
The operating system, the data structures and the
database application used at each location are
incompatible
9. Distributed Data Storage
Consider a relation r that is to be stored in the database. There
are several approaches to storing this relation in the
distributed database.
Replication: The system maintains several identical
replicas (copies) of the relation, and stores each replica at a
different site.
Fragmentation: The system partitions the relation into
several fragments and stores each fragment at a different
site.
Allocation: Each fragment – or each (replicas)copy of
fragment – must be assigned to a particular site in the
distributed system. This is called data allocation
10. Replication
If relation r is replicated, a copy of relation r is stored in
two or more sites. In the most extreme case, we have full
replication, in which a copy is stored in every site in the
system. There are number of advantages and
Disadvantages to this replication :
Availability : If one of the sites containing relation r fails,
then the relation r can be found in another site.
Increased Parallelism : The more replicas of r there are,
the greater the chance that the needed data will be found in
the site where the transaction is executing.
11. Increased Overhead on Update : The system must ensure
that all replicas of a relation r are consistent , otherwise
erroneous computation may result. Thus , whenever r is
updated, the update must be propagated to all sites
containing replicas.
Replication enhances the performance of read operation
and increase the availability of data to read only
transaction.
12. Fragmentation
If relation r is fragmented, r is divided into a
number of fragments r1, r2, . . . , rn. These
fragments contain sufficient information to allow
reconstruction of the original relation r using
Union or Join operation on various fragments.
There are two different schemes for fragmenting a
relation:
Horizontal fragmentation
Vertical fragmentation
13. 8
Horizontal Fragmentation
This splits the relation by assigning each tuple of r to one or more fragments
Branch-name Account-
number
Balance
Hillside A-305 500
Hillside A-226 336
Valleyview A-177 205
Valleyview A-402 10000
Hillside A-155 62
Branch-
name
Account-
no
Balance
Valleyview A-177 205
Valleyview A-402 10000
Branch-
name
Account-no Balance
Hillside A-305 500
Hillside A-226 336
Hillside A-155 62
14. Vertical fragmentation
This splits the relation into subrelation where each sub relation is defined by a subset of the
columns of the original relation.
Branch
no
Accountn
o
Cu_name Balance Tup_id
Hillside A-305 Lowman 500 1
Hillside A-226 Camp 336 2
Valleyview A-177 Camp 205 3
Valleyview A-402 Khan 10000 4
Hillside A-155 Khan 62 5
Valleyview A-408 Khan 1123 6
Branchno Cu_name Tup_id
Hillside Lowman 1
Hillside Camp 2
Valleyview Camp 3
Valleyview Khan 4
Hillside Khan 5
Valleyview Khan 6
Accountn
o
Balance Tup_id
A-305 500 1
A-226 336 2
A-177 205 3
A-402 10000 4
A-155 62 5
15. Allocation
The choice of sites and the degree of replication depend on the
performance and availability goals of the system.
It also depends on the types and frequencies of transactions
submitted at each site
For example
If high availability is required and transaction can be
submitted at any site.
If most transactions are retrieval only, fully replicated
database is a good choice.
If certain transactions that access particular parts of the
database are mostly submitted at a particular site,the
corresponding set of fragments can be allocated at that site only.
16. Advantages ( Objectives of
Distributed Databases )
1. Management of Distributed Data with different levels of
transparency : Distribution transparent in the sense of
hiding the details of where each file(table ,relation) is
physically stored within the system. Types of
transparencies are
Distribution or Network Transparency : Freedom for the
user from the operational details of the network. It is
further divided into Location Transparency (independent
of location of data and the location of the system) and
Naming Transparency ( named object can be accessed
without additional information).
17. Replication Transparency : It makes the user unaware of
the existence of copies.
Fragmentation Transparency : It makes the user unaware
of the existence of Horizontal or Vertical Fragments
18. 2. Increased reliability and
availability
These are potential advantages cited
for distributed data base.
Reliability is broadly defined as the
probability that the system is running at
a certain time point
Availability is the probability that the
system is continuously available during
the time interval.
19. 3. Improved Performance
The distributed DBMS fragments the
data base by keeping the data closer to
where it is needed most.
Data localisation reduced the contention
for CPU and input output services and
simultaneously reduced excess delays
involved in wide area networks.
20. 4. Easier
Expansion
Expansion of the system
in terms of adding more
data increasing data base
size or adding more
processors is much easier
5. Keeping Track
of Data
The ability to keep track
of the data distribution,
fragmentation and
replication by expanding
the DDBMS catalogue
21. 6. Distributed
Query
Processing
The ability to access remote
sites and transmit querries
and data amongst the
various sites via
communication network.
7. Replicated data
management
The ability to decide which
copy of replicated data item
to access and to maintain
the consistency of copies of
a replicated data item.
22. 8. Distributed Transaction
Management
The ability to devise execution strategy for
querries and transactions that access data
from more than one site and to synchronise
the access to distributed data and maintain
the integrity of the overall data base.
23. 9. Distributed data base recovery
The ability to recover from individual
site crashes and from new types of
failures such as failure of the
communication link.
24. 10. Security
Distributed transaction must
be executed with the proper
management of the security
of the data and the access
privilege of users.
11. Distributed
Directory (
Catalogue )
Management
Directory contains
information ( meta data )
about data in the data base.
The directory may be global
for entire DDB
25. Disadvantages
Complexity of management and control
Increased storage and infrastructure
requirement
Multiple copies of data has to be at
different sites thus an additional disc
storage space will be required
26. The probability of security lapse
increases when data are located at
multiple sites.
Difficult to maintain integrity