Characteristics of Distributed databases
Introduction
Distributed database:
Distributed database
= a
database
whose
data (relations)
are
stored
on
multiple
autonomous
sites
Minimum requirements
to be called
distributed
:
Nodes (sites)
are
interconnected
by a
computer network
(
not
a
LAN (local area network)
)
Each
node (site)
maintains a
database
Data
stored
at
different
sites
are
different
The various
databases
(stored at the
sites
) are
logically
related
Nodes
(computers) at the
sites
can be
heterogeneous
(=
different types
of
computers
)
Example:
bank
A
bank
has
many
branches
Each
branch
keeps a
database
of
accounts
at that
branch
A
central
branch office
keep
bank employee records
and
fee/interest rate
information
Graphically:
Distributed database
vs.
shared-nothing parallel system
Important
differences
between a
distributed database
and a
shared-nothing parallel system
:
System aspect
:
Nodes
of
distributed DB
can be
heterogeneous
Nodes
of
shared nothing parallel system
are
homogeneous
Performance aspect
:
Distributed database systems
has
higher
communication cost
!!!!
Shared-nothing
parallel system
:
Storage/processing nodes
are
located
in the
same
room
Interconnection network
used has
Gbps
transmission rate
Distributed database:
Storage/processing nodes
can be
located
in
different
states
or even
countries
Interconnection network
used has
Mbps
transmission rate
Consequently:
Dominant
cost
in
shared-nothing
parallel system
:
Disk I/O
Dominant
cost
in
Distributed databases
:
Communication
!!!
Logical
relations and physical relations
Consider
the
accounts
of a
bank
that are
stored
in
different
branches
:
Physically speaking:
There are
multiple
physical relations
stored at
different
sites
Logically speaking:
There is
only
one
logical relation
that store
information
of the
bank accounts
of the
bank
Horizontal and vertical decomposition
A
logical relation
can be
decomposted
into
mulitple
physical relations
in
2 ways
:
Horizontal
decomposition
:
The
tuples
of the
logical relations
are
stored
over
multiple
locations
Graphically:
Vertical
decomposition
:
The
logical relation
is
decomposed
into
multiple
relations
(reconstructed using
join operations
)
Graphically:
Note:
You need to use
join operations
to obtain the
logical relation
....
Tuple storage in distributed database vs. shared-nothing parallel system
Recall:
tuple storage
in
shared-nothing parallel system
Tuples
are
hashed
and
stored
at the
site
with the
hash ID
Result:
Duplicate tuples
will be
stored
at the
same
site
Many relational algebra operations
can be
performed
locally
without using
other
fragments
Distributed Database:
Tuples
are
stored
in the
site of "creation"
There is
no
hash function
used to
re-distribute
the
tuples
!!!
Data Replication
System failures:
When some
part
of a
system
fails
, the
data stored
on the
failed
part
becomes
inaccessible
Example:
Fault Tolerance:
Distributed Databases
can
often
tolerate (a limited number of)
system (e.g., site) failures
The
commonly used
method to
achieve
fault tolerance
is
data
replication
:
Every
relation
is
stored
on
multiple
sites
Note:
The
different
copies
must be
consistent
We must use
additional
replica control
protocols
to keep the
multiple
copies
of
data
consistent