Consider this schedule of two transactions:
| T1 | T2 |
|---|---|
| r(X) | |
| r(X) | |
| w(Y) | |
| w(Y) | |
| commit | |
| commit |
Is this schedule:
conflict serializable?
serializable?
recoverable?
cascadeless?
Consider this schedule of two transactions:
| T1 | T2 |
|---|---|
| r(Y) | |
| r(Y) | |
| w(X) | |
| r(X) | |
| w(Y) | |
| w(Y) | |
| commit | |
| commit |
Is this schedule:
conflict serializable?
serializable?
recoverable?
cascadeless?
Would any of the answers for schedule 2 change if we swapped the order of the two commits?
Precedence graphs can help us to determine if a schedule is conflict serializable.
Consider this schedule of four transactions:
| T1 | T2 | T3 | T4 | |
|---|---|---|---|---|
| 1 | r(X) | |||
| 2 | r(X) | |||
| 3 | w(Y) | |||
| 4 | r(Y) | |||
| 5 | r(Y) | |||
| 6 | w(X) | |||
| 7 | r(W) | |||
| 8 | w(Y) | |||
| 9 | r(W) | |||
| 10 | r(Z) | |||
| 11 | w(W) | |||
| 12 | r(Z) | |||
| 13 | w(Z) |
Draw a precedence graph for this schedule.
If the schedule is conflict serializable, state one possible equivalent serial schedule. If the schedule is not conflict serializable, explain briefly why the schedule is not equivalent to the serial schedule T1; T2; T3; T4. Your explanation should include a discussion of why particular actions from the original schedule are not consistent with that serial schedule.
The XQuery problems in PS 3: Part I involve two types of problems:
When writing a FLWOR expression, we encourage you to take advantage of some guidelines that were developed by Alice Han ‘26.
For an example of how they can be used, let’s solve another problem based on the bank database from Lab 4:
Write an XQuery FLWOR expression to list, for each branch of the bank with more than one account, the account numbers of all accounts at that branch. The resulting elements should have the following form:
<branch_accounts> <branch_name>branch 1 name</branch_name> <account_num>branch 1 account number 1</account_num> <account_num>branch 1 account number 2</account_num> ... </branch_accounts> <branch_accounts> <branch_name>branch 2 name</branch_name> ... </branch_accounts> ...
Sort the results by the name of the branch.
Hints:
To ensure that you only consider a given branch name once, you
should use the distinct-values function. For example, to
iterate over distinct Oscar types from our movie database, you
would do the following:
for $t in distinct-values(//oscar/type)
distinct-values gives you the text values of the
corresponding elements, not the elements themselves. This
means that you will not need to use the string function
when creating the new branch_name elements.
Last updated on October 15, 2026.