Escolar Documentos
Profissional Documentos
Cultura Documentos
Network Topology
A
B
B
C
E
A
B
C
E
D
E
A
Tree structured
network
C
E
Ring network
Star network
Cost/reliability
#of hops
Tradeoffs between
1. keeping data in centralized headquarters:
simpler maintenance
simpler consistency enforcement
possibly more efficient if many updates,aggregate
computations
Advantages of DDBS
(heterogeneous)
Interconnectivity of pre-existing DBs
Expandability (dont need to replace whole system
to grow)
Cost (many small engines on PCs cheaper than
mainframes)
issue:communication costs vs.
hardware computation costs.
Performance (place data near where used)
Availability and reliability
Complicating factors
Maintaining data consistency (in face of replication
and sharing)
Distributed directory management (who controls
mapping of data to sites)
Security
Heterogeneous Databases
different database architectures
site2
site1
R1
site3
Copy of R1
site4
Copy of R1
REPLICATION
(Horizontal)
1/3 of R1
1
2
1/3 of R1
FRAGMENTATION
(Vertical)
Copy of R2
Copy of R2
R2
A/B
Of
R2
4
5
6
7
C/D
Of
R2
1/3 of R1
8
9
Replication
Issues:
Non redundant
allocation
Replication (cont)
Advantages:
Improved availability (multiple sources for a relation if a
site is down)
Increased parallelism (sites can process (primarily) readonly operations in parallel,minimizing data transfer)
(well suited for read-only, majority read-only data
access)
Replication (cont)
Disadvantages:
o problems/overhead for writes/updates
o costs of consistency enforcement
- updates propagated to all sites
(communication costs)
- costs of synchronization/locking for
consistency enforcement on update greater
than in single source models.
FRAGMENTATION
Vertical
Horizontal
mixel
Issues:
- completeness: Every
tuple/attribute in some fragment
- reconstruction:easy way of
reconstructing full relation
- transparency
HORIZONTAL FRAGMENTATION
Original relation
A1
A2
An
T1
A1
A2
T1
An
1
T2
T3
T2
T3
.
.T60
Site 1
.T60
T61
A1
A2
An
Tn
T61
.
.
Tn
Site 2
How to reconstruct
R=Rs1 Rs2 . Rsn
Horizontal Fragmentation
Example Usefulness:
- Each branch office maintains complete attribute set of its
employees
(salary,benefits,address/phone,departments,projects,etc.)
- Site of Fragment easily determined by a key attribute
value -e.g. Branch_office*
VERTICAL FRAGMENTATION
A1
Original
Relation
(R)
TID Tuple ID
Hidden Attribute to
ensure account
and simple join
reconstruction
A3
A4
t1
How to Reconstruct:
t2
R=Rs1
Rs2
Rsn
tn
A1
RS1
A2
A2
t1
t2
TID
TID
1
2
1
2
A3
RS2
A4
t1
t2
RS1.TID=RS2.TID
tn
tn
SITE1
SITE2
Join condition
VERTICAL FRAGMENTATION
Example usefulness:
Salary Office
Benefits Office
Directory (Name|address|phone|fax)
Dependents Management Office
each control their own appropriate
attribute for all corporate branch offices
VERTICAL Attribute-centered management
(keep all instances of an attribute in one place)
HORIZONTAL tuple/individual-centered management
(keep all values of a tuple in one place)
MIXED FRAGMENTATION
Rs1
A1
A2
A3
A4
Rs3
A5
u
s
a
R
A1
A2
A3
A4
A5
Rs2
A1
A2
A3
A4
(Salary
Attributes)
(Benefit
Attributes)
Rs4
A5
E
u
r
o
p
e
A1 A2 A3 A4
A2 A3 A4 A5
Overlap
(replication of attributes)
TRANSPARENCY
Fragmentation Transparency
-User doesnt need to know mapping between relations and
fragmented subrelations
Replication Transparency
-User doesnt need to know about existence or location of other
copies (treat as if single copy of DB)
Location and Naming Transparency
-Use shouldnt need to know about location and full names
of data on the server
Unique name
Salary(ssn=so(Employee))
Name Server
LName(salary>40,000(Employee))
Horizontal
fragmentations
=Emp1 U Emp2
2 Fragments
LName(salary>40,000(Emp1)) U LName(salary>40,000(Emp2))
Site 1
Site 2
Site1
50K
(A
Site2
1K
Site3
3K
B)
1K
3K
0.5K
(B
50K
Parallel Processing
C)
0.5K
0.5K
(xx(A))
(B
C)
Site 1
10,000 records,
1,000,000 bytes
Department)
Mg rssn
to ssn
Site 2
100 records, 3000
bytes
Strategies:
1)Ship both relations to the result site and join there
1,003,000 bytes
transfered
1,002,000 bytes
transfered
5,000 bytes
transfered
RECOVERY IN DDBS
-transaction managers / coordinators
-log managers
Problems:
-failure of site
Difficult to know
-failure of link
which had occurred
-loss of messages
if server is down, elect new server what about network partitioning?
Original
Server
Servers
link
Newly
elected
Server