Download distributed data base ppt and more Slides Advanced Algorithms in PDF only on Docsity!
Distributed Database Systems
COP
What is a Distributed Database System
?
A distributed database is a collection of databases which are
distributed over different computers of a computer network.• Each site has autonomous processing capability and can
perform local applications.
- (^) Each site also participates in the execution of at least one
global application which requires accessing data at several
sites.
Communication Network
Server 1
Database 1
Server 2
Database 2
Server 3
Database 3
Why Distributed Databases?
1. Local Autonomy: permits setting and enforcing local policies
regarding the use of local data (suitable for organization that are
inherently decentralized).
2. Improved Performance: The regularly used data is proximate to
the users and given the parallelism inherent in distributed
systems.
3. Improved Reliability/Availability:
(^) Data replication can be used to obtain higher reliability and
availability.
(^) The autonomous processing capability of the different sites
ensures a graceful degradation property.
4. Incremental Growth: supports a smooth incremental growth with
a minimum degree of impact on the already existing sites.
5. Shareability: allows preexisting sites to share data.
6. Reduced Communication Overhead: The fact that many
applications are local clearly reduces the communication overhead
with respect to centralized databases.
Disadvantages of DDBSs
Cost: replication of effort (manpower).
Security: More difficult to control
Complexity:
- (^) The possible duplication is mainly due to reliability
and efficiency considerations. Data redundancy,
however, complicates update operations.
- (^) If some sites fail while an update is being executed,
the system must make sure that the effects will be
reflected on the data residing at the failing sites as
soon as the system can recover from the failure.
- (^) The synchronization of transactions on multiple
sites is considerably harder than for a centralized
system.
NetworkTransparancy
The user should be protected from the
operational details of the network.
• It is desirable to hide even the
existence of the network, if possible.
Location transparency: The command used
is independent of the system on which the
data is stored.
Naming transparency: a unique name is
provided for each object in the database.
Replication & Fragmentation
Transparancy
The user is unaware of the replication of
framents
Queries are specified on the relations
(rather than the fragments).
Fragment R
Fragment R
Fragment R
Fragment R
Copy 2 of R
Copy 1 of R
Copy 1 of R
Relation R
Copy 2 of R
Site A
Site B
Site C
A Taxonomy of Distributed Data
Systems
Distributed data systems
Homogeneous
Heterogeneous
(Multidatabase)
Unfederated
(no local users)
Federated
Loosely coupled
(interoperable DB
systems using
export schema)
Tightly coupled
(/w global schema)
A distributed database
can be defined as
integrated
collection of shared
data which is
distributed across
the nodes of a
computer network.
Architecture of a Homogeneous DDBMS
Global user
view 1
Global Schema
Global user
view n
Fragmentation
Schema
Local
conceptu
al
schema 1
Local
internal
schema 1
Local DB 1
Allocation
Schema
Local
conceptu
al
schema n
Local
internal
schema n
Local DB n
A homogeneous
DDBMS resembles a
centralized DB, but
instead of storing all
the data at one site,
the data is
distributed across a
number of sites in a
network.
Homogeneous vs.
Heterogeneous
- (^) Homogeneous DDBMS
- (^) No local users
- (^) Most systems do not have
local schemas (i.e., every
user uses the same
schema)
- (^) Heterogeneous DDBMS
- (^) There are both local and
global users
- (^) Multidatabase systems are
split into:
- (^) Tightly Coupled Systems:
have a global schema
Systems: do not have a
global schema.
Multidatabase
Management
system
DBMS DBMS DBMS DBMS
Global
user
Local
user
Local
user
Database 1 Database 2 Database 3 Database 4
Schema Architecture of a Tightly-
Coupled System
Global user
view 1
Global user
view n
Global Conceptual Schema
Local
Participatio
n Schema 1
Auxiliary
Schema 1
Local
Conceptual
Schema 1
Local user
view 1
Local user
view 2
Local
Internal
Schema 1
Local DB 1
Local
Participatio
n Schema 1
Auxiliary
Schema 1
Local
Conceptual
Schema 1
Local user
view 1
Local user
view 2
Local
Internal
Schema 1
Local DB 1
An individual node’s
participation in the
MDB is defined by
means of a
participation schema.
Auxiliary Schema (2)
Rules for naming conflicts: naming conflicts occur
when:
semantically identical data items are named differently
- (^) DNAME Department name (at Site 1)
- (^) DEPTNAME Department name (at Site 2)
semantically different data items are named identically.
- (^) NAME Department name (at Site 1)
- (^) NAME Manager name (at Site 2)
Rules for handling data representation conflicts:
Such conflicts occur when semantically identical
data items are represented differently in different
data source.
Example : Data represented as a character string in one
database may be represented as a real number in the other
database.
Auxiliary Schema (3)
Rules for handling data scaling conflicts:
Such conflicts occur when semantically
identical data items stored in different
databases using different units of measure.
Example : “Large”, “New”, “Good”, etc.
These problems are called
domain mismatch problems
Loosely-Coupled Systems
Global
user view 1
Global
user view 2
Global
user view m
Local
Conceptual
schema 1
Local
internal
schema 1
Local
internal
Schema 2
Local
Conceptual
Schema 2
Local
internal
Schema n
Local
Conceptual
Schema n
Local DB n Local DB 1 Local DB 2
Local
user view 1
Local
user view 2
Export
schema 2
Export
Schema 3
Export
Schema n
Export
schema 1
Integration of Heterogeneous Data
Models
Provide bidirectional translators between all
pairs of models
- (^) Advantage: support multiple models at the global
level. No need to learn another data model and
language
- (^) Disadvantage: requires n(n-1) translators, where
n is the number of different models.
Adopt a single model (called canonical
model) at the global level and map all the
local models onto this model
- (^) Advantage: requires only 2n translators
Disadvantage: translations must go through the
global model.
(The 2
nd approach is more widely used)