Databases Reference
In-Depth Information
Transaction
Site(s)
Frequency
Table Accesses (Reads, Writes)
T1
S1, S4, S5
1
Four to tab1 (3 reads, 1 write), two to tab2 (2
reads)
T2
S2, S4
2
Two to tab1 (2 reads), four to tab3 (3 reads, 1
write)
T3
S3, S5
3
Four to tab2 (3 reads, 1 write), two to tab3 (2
reads)
Security: user transactions T1, T2, and T3 can either query or update (no restrictions).
Sources of data: all sites—S1, S2, S3, S4, and S5.
Sinks of data (possible locations of transactions): all sites—S1, S2, S3, S4, and S5.
Cost/Benefit Computations
The cost/benefit computations described in this section are summarized in Table 16.1.
Table tab1
Table tab1 at site S1 has the following cost: two remote updates (writes) by transaction
T1 (frequency of one), one each from sites S4 and S5, multiplied by 600 milliseconds per
write, totaling 1,200 milliseconds, plus one local update by T1 at site S1 at 150 millisec-
onds, for a grand total of 1,350 milliseconds. The benefit is from three queries (reads) by
transaction T1 at site S1, multiplied by the difference between a remote and local query
(500 - 100 = 400 milliseconds), totaling 1,200 milliseconds.
Table tab1 at site S2 has the cost of three remote updates by transaction T1 (fre-
quency of one)—one each from sites S1, S4, and S5—multiplied by 600 milliseconds
per write, totaling 1,800 milliseconds. The benefit is from two queries (reads) by trans-
action T2 at site S2 (frequency of two), multiplied by the difference between a remote
and local query (400 milliseconds), totaling 1,600 milliseconds.
Table tab1 at site S3 has the cost of three remote updates by transaction T1 (fre-
quency of one)—one each from sites S1, S4, and S5—multiplied by 600 milliseconds
per write, totaling 1,800 milliseconds. There is no benefit, because no transaction
accesses table tab1 locally at site S3.
Table tab1 at site S4 has the cost of two remote updates by transaction T1 from
sites S1 and S5 (frequency of one), multiplied by 600 milliseconds per write, totaling
1,200 milliseconds, plus one local update by T1 at site S4 at 150 milliseconds, for a
grand total of 1,350 milliseconds. The benefit is three queries by transaction T1 (fre-
quency of one) and two queries by transaction T2 (frequency of two), multiplied by 400
milliseconds, totaling 2,800 milliseconds.
Table tab1 at site S5 has the cost of two remote updates by transaction T1 from
sites S1 and S4 (frequency of one), multiplied by 600 milliseconds per write, totaling
Search WWH ::




Custom Search