Professional Documents
Culture Documents
INFSCI 2711: Advanced Topics in Database Management Spring 2020
INFSCI 2711: Advanced Topics in Database Management Spring 2020
1. [30pt] Consider a database system replicated over sites in Pitt, NYC, Chicago, Washington,
Philadelphia. Assume that the database system stores the following relation:
Employee (eid, ename, dep_id, sal)
Consider the following query:
2. [30 pt] Consider the following partial schedule for transactions with timestamps
1,2,3,4,5:
T1 T2 T3 T4 T5
Read(X)
Read(Y)
Read(X)
Write(X)
Read(Y)
Read(Y)
Write(Y)
Read(Y)
Write(Z)
Read(Z)
3. [20 pts] Suppose that 2PC is used as a commit protocol. Consider the following parts of
recovery sub-scenarios for a distributed transaction T with coordinator C and two
participating sites P1 and P2:
1.1 P2 checks its log and then aborts.
1.2 P1 sends query status request to P2 and then commits.
1.3 P1 sends query status request to P2 and then waits for messages from C.
Consider the following cases:
(a) A participating site for T fails after receiving a commit message.
(b) A participating site for T fails after sending a ready message.
(c) The coordinator site for T fails after sending a commit message.
For each of the recovery sub-scenarios specify a group of above cases that are
possible for that sub-scenario. Your answer should be represented as the following table
(please, provide your explanation):
Sub-scenario Possible cases (e.g., (a),(b), …)
1.1
1.2
1.3
4. [10 pts] Find the Query Optimization of the following expression with the
multiple transformation (include all steps).
Π student name
σ student country =' USA '∧ department =' computer ' ∧ class=' INFSCI 2711 '
Department
⋈
Student Class