Docsity

CSEP 545 Assignment 8: Database Replication and Transaction Processing for E-Commerce, Exercises of Transaction Processing for E Commerce

Toggle sidebar
bg1
CSEP 545 Transaction Processing for E-Commerce 2/29/2012
Assignment 8 1
Assignment 8
Problem 1.
We replicate database DB1 (assuming full replication, rather than partial replication).
a) Assume DB1 is a read-only database.
1. Could availability decrease due to replication? Why?
2. Is there a bound on system throughput (read-only transactions per second) as we
increase the number of replicas?
b) Assume DB1 processes update-only transactions.
1. Describe a situation where availability is decreased.
2. Assuming infinite network bandwidth, what factor(s) bound the number of
update-transactions per second? How is each factor affected as the number of
replicas increases?
Problem 2.
A database is replicated on two servers, server A and server B. Each transaction executes
on one server using two phase locking and propagates its updates within the transaction
boundary to the other server. Transactions commit using two phase commit.
Does this replication protocol provide one-copy-serializability? If “yes”, provide an
argument, and if “no”, provide a history.
Problem 3.
Assume a database is replicated on two servers. Transactions run serially at both servers.
Updates are propagated by executing each transaction on both servers. Suppose the
system executes the following transaction program:
T = { read x; read y; write z = x + y; write w = time.now()}
Where time.now() is a database function that returns the current time.
What could go wrong using this approach? Suggest solutions. Does your answer change if T is
executed multiple times on each server?
docsity.com

Partial preview of the text

Download CSEP 545 Assignment 8: Database Replication and Transaction Processing for E-Commerce and more Exercises Transaction Processing for E Commerce in PDF only on Docsity!

CSEP 545 Transaction Processing for E-Commerce 2/29/

Assignment 8 1

Assignment 8

Problem 1.

We replicate database DB1 (assuming full replication, rather than partial replication). a) Assume DB1 is a read-only database.

  1. Could availability decrease due to replication? Why?
  2. Is there a bound on system throughput (read-only transactions per second) as we increase the number of replicas? b) Assume DB1 processes update-only transactions.
  3. Describe a situation where availability is decreased.
  4. Assuming infinite network bandwidth, what factor(s) bound the number of update-transactions per second? How is each factor affected as the number of replicas increases?

Problem 2.

A database is replicated on two servers, server A and server B. Each transaction executes on one server using two phase locking and propagates its updates within the transaction boundary to the other server. Transactions commit using two phase commit.

Does this replication protocol provide one-copy-serializability? If “yes”, provide an argument, and if “no”, provide a history.

Problem 3.

Assume a database is replicated on two servers. Transactions run serially at both servers. Updates are propagated by executing each transaction on both servers. Suppose the system executes the following transaction program: T = { read x; read y; write z = x + y; write w = time.now()} Where time.now() is a database function that returns the current time.

What could go wrong using this approach? Suggest solutions. Does your answer change if T is executed multiple times on each server?

docsity.com