Databases Reference
In-Depth Information
1,200 milliseconds, plus one local update by T1 at site S5 at 150 milliseconds, for a
grand total of 1,350 milliseconds. The benefit is three queries by transaction T1 (fre-
quency of one), multiplied by 400 milliseconds, totaling 1,200 milliseconds.
In summary, for table tab1 benefit exceeds cost only at site S4; thus, only one copy
of tab1 is allocated to this network.
Tables tab2 and tab3
With similar computations we obtain the results for tables tab2 and tab3 as shown in
Table 16.1. In summary, for table tab2, benefit exceeds cost at sites S3 and S5. For
table tab3, benefit exceeds cost at all sites except S1.
Allocation Decision
Figure 16.2 presents the allocation decision. Allocate table tab1 to site S4. Allocate table
tab2 to sites S3 and S5. Allocate table tab3 to sites S2, S3, S4, and S5.
In the cases where benefit and cost are equal, consider whether either cost or benefit
(or both) is likely to change in the near future or if greater availability is important.
Adjust the allocation accordingly. If cost exceeds benefit at all sites for a given table, then
pick the site for a single allocation where the difference between cost and benefit is mini-
mized.
Note that there exist many more elaborate data allocation strategies than are cov-
ered here, however, this text has highlighted the major issues to provide a simple
method when quick analysis is needed.
The all-beneficial sites method can be derived from exhaustive enumeration of total
cost for the initial allocation configuration and the total cost for a new allocation config-
uration after the replication of a table at a given site. The decision is made to replicate
the table if the total cost after replication is lower than the total cost before replication.
For example, let table tab1 be initially allocated to site S1. We need to decide
whether to replicate tab1 at site S2. Let query Q1 and update U1, both originating at
site S1, access tab1; and let query Q2 and update U2, both originating at site S2, also
access tab1.
To t a l - c o s t 1 (initial allocation of tab1 to S1) = Q1(local) + U1(local)
+ Q2(remote) + U2(remote)
To t a l - c o s t 2 (after replication of tab1 at S2) = Q1(local) + U1(local)
+ U1(remote) + Q2(local) + U2(local) + U2(remote),
where queries Q1 and Q2 are made to the closest copy of tab1, and updates U1 and U2
must be made to both copies of tab1. We allow tab1 to be replicated at S2 if the follow-
ing condition holds:
Search WWH ::




Custom Search