Title: Chapter 5: Managing Distributed Requests
1Chapter 5 Managing Distributed Requests
2Managing Distributed Requests
- Data Transparency
- Distributed Execution Models
3Data Transparency
4Data Transparency, cont.
- Users are isolated from underlying data
structures. - User is not aware of underlying data structures.
- Underlying data structures can be changed without
changing existing transactions. - Types of data transparency
- Data structure data independence of
centralized DBMSs - Existence of fragments fragmentation
transparency - Location of fragments location transparency
- Replication of fragments replication
transparency
5Fragmentation and Allocation Example
fragmented
Store at site 1
Store at site 2 Store at site 3
6No Fragmentation, Replication, or Location
Transparency
- User is aware of fragments, replication, and
location. - To retrieve Daviss salary
select Salary from Employee1 at Site1 where
Name"Davis" UNION select Salary from Employee1
at Site1 where Name"Davis"
7No Fragmentation Transparency, But Replication
and Location Transparency
- User is aware of fragments
- To retrieve Daviss salary
location hidden
location and replication hidden
select Salary from Employee1 where
Name"Davis" UNION select Salary from
Employee2 where Name"Davis"
8Total Transparency
- User is only aware of unfragmented table
- To retrieve Daviss salary
EmployeeEmployee Name Employee Salary
Department NameAckman
5000 Car Baker 4500
CarCarson 4800 ToyDavis
5100 Toy
(fragments and their replications and locations
are hidden)
select Salary from Employee1 where Name"Davis"
9Complex Example
update Employee set Department15 where EmpId100
More
10Complex Example, cont.
- select Name,Sal,Tax, into Name,Sal,Taxfrom
Employee1where EmpId100 - select ManagerNumber into ManagerNumberfrom
Employee2where EmpId100 - insert into Employee3 (EmpId,Name,Department)
(100,Name,15) - insert into Employee4 (EmpId,Sal,Tax,ManagerNumbe
r)
(100,Sal,Tax,ManagerNumber) - delete Employee1 where EmpId100delete
Employee2 where EmpId100
11Summary Fragmentation, Replication, and Location
Transparency
- Advantages
- Easier to write transactions
- Less modification of existing transactions when
- Fragmentation changes
- Fragment replication changes
- Fragment location changes
- Disadvantage
- Overhead of global query optimizer
12Managing Distributed Requests
- Data Transparency
- Distributed Execution Models
13Distributed Execution Models
14Distributed ExecutionPlan Example
- Transaction
- Allocation information
- Global execution plan
Read X Read Y Read Z Report XYZ to user
Read X from DB1 Read Y from DB2 Read Z from
DB3 Calculate XYZ Report XYZ
Subtransactions to beexecuted at different sites
More
15Distributed Execution Plan Example, cont.
RX
RZ
RY
X
Z
Y
Report XYZ
Rx means Read x
16Services Needed
- Remote process activation
- Process synchronization
- Interprocess temporary data transfer
- Remote process deactivation
17Three Approaches
- Master/Slave control
- Triangular control
- Hierarchical control
18Master/Slave Approach Participants
- One global execution manager
- Acts as master
- One or more local execution manager
- Act as slaves
19- Distributed execution plan
C Command R Response
20Master/Slave ExampleSDD-1 (CCA)
- Distributedexecution plan
Read
Read
Read
. . .
Data
Data
Data
Write
Write
Write
. . .
Done
Done
Done
TM Transaction Manager DM Data Manager
21Summary Master/Slave Approach
- Advantages
- Simple
- Global execution coordination controls all
synchronization. - Disadvantages
- When intermediate results are needed by another
local execution monitor, they must first be
transmitted to the global execution monitor.
22Triangular Control
- Distributed execution plan
Distributed ExecutionManager
C
C
R
R
Local ExecutionManager
Local ExecutionManager
Temporary Data
. . .
23Triangular Example DDTS (Honeywell)
- Distributed execution plan
Source Rahimi, S., et al. A Structured View of
Honeywells Distributed Database Test-bed
System. IEEE Database Engineering (December
1982).
24Summary Triangular Control
- Advantages
- No unnecessary data transmission between the
global execution manager and local execution
manager - Disadvantages
- Some synchronization is necessary among local
execution managers.
25Hierarchical Example System R (IBM)
- Distributed execution schedule
Distributed ExecutionManager
C
C
R
R
Local ExecutionManager
Local ExecutionManager
. . .
C
C
C
C
R
R
R
R
Local ExecutionManager
Local ExecutionManager
. . .
. . .
26Summary Hierarchical Control
- Advantage
- Permits incremental planning each local
execution manager acts as a global execution
manager - Disadvantage
- Complexity
27Summary
- Distributed Execution Model Control
- Master/Slave control Centralized
- Triangular control Shared
- Hierarchical control Distributed