Information Technology Reference
In-Depth Information
transaction at that server, upon a request from a remote server, but, for security
or other reasons, the stored procedure is not allowed to be executed as part of a
distributed transaction coordinated by a remote server governed by an unfamiliar
organization.
A prime example is an online store, where a customer first selects items to a
shopping basket and then places the order, which includes paying for the order in
advance. Ideally, the placement of the order and the payment for it should together
form a single atomic transaction. However, this is not possible to achieve, because
the financial institution through which the payment is transferred certainly does not
allow its transactions to be coordinated by other organizations.
Assume that the financial institution only allows remote servers governed by
other organizations to request the execution of a stored procedure that takes as
arguments credit-card information and the sum to be withdrawn, so that this
procedure is executed as a local transaction on the server of the financial institution.
Discuss possible means of ensuring consistency across the order information stored
in the database of the online store and the account balances stored in the database
of the financial institution.
13.9 Relation r.X;V/ is totally replicated, so that each server of the distributed
database system stores a replica of the relation. At one site, a transaction T is started
by the following statements:
exec sql update r set V D 2 V ;
exec sql select sum (V ) into : new_sum from r ;
exec sql commit .
Explain the execution of the transaction (including locking and logging), when
replicas are managed using (a) the eager read-one-write-all protocol and (b) the
primary-copy protocol.
13.10 Define the three isolation anomalies (dirty writes, dirty reads, unrepeatable
reads) for transactions on a replicated database. For ensuring a given level of
isolation, are any changes needed in the locking protocols we have presented for
transactions on a centralized database?
13.11 Show that in a replicated database, a deadlock can occur even if each
transaction operates on a single data item only and no locks are upgraded.
13.12 An alternative to temporary triggers in implementing asymmetric replication
is to use a tentative query on the relation to be updated in order to find out the unique
keys of the tuples that are touched by the update, and then, using this set of keys,
to generate update statements to be shipped to the replica servers. Work out this
method in the case of Example 13.7 .
13.13 Updates from a primary database are propagated to its remote backup
database using log-record shipping, as explained in Sect. 13.8 . Could this method
also be used in implementing asymmetric update propagation in an ordinary
replicated database? If so, compare the pros and cons of this method against the
Search WWH ::




Custom Search