ILOVEJESSEDUONG, COSC 3380 EXAM 4
QUESTIONS AND ANSWERS 100% PASS
Refer to the animation above and match the conflict type with the corresponding transactions.
T1 reads salaries of some Accounting department employees
T2 transfers Maria Rodriguez from Accounting to Development
T2 commits
T1 reads salaries of remaining Accounting employees
T1 computes and writes total salary of Accounting employees
T1 commits - ANS Phantom read
Initial values: X = 2, Y = 8, Z = 0
B and C are ________ schedules - ANS conflicting
If user needs to know only average department salaries for the Toy and CS departments, which
one should be used: the table or one of the views? - ANS Deptinfo
Assume existence of user Assistant Manager assistant. What privilege should you grant to
assistant who needs to know only average department salaries? Express it in proper SQL.
GRANT ______ ON Deptinfo TO assistant - ANS SELECT
@COPYRIGHT ALL RIGHTS RESERVED PAGE 1 OF 20
,Consider the following Schedule:
S = [R1(Z), W2(X), R2(Z), R2(Y), W1(X), W3(Z), W1(Y), R3(X)]
where Ri(Z)/Wi(Z) indicates a read/write by transaction i on data item Z.
Is the Schedule Serializable. - ANS YES
Enter the value of Z after the Schedule A executes.
Initial values: X = 2, Y = 8, Z = 0 - ANS 4
Execute each schedule and complete the given statements.
Initial vales: X = 2, Y = 8, Z = 0.
A and B are _________ Schedules. - ANS equivalent
The above direct graph is missing an edge, which one? - ANS T3->T1
Verifying the identity of a user is called - ANS authentication
After a rollback, the database restarts a transaction - ANS Sometimes
When a failure occurs, the database is notified and attempts to restart the transaction. -
ANS False
Select transaction's 5 isolation level - ANS READ UNCOMMITED
@COPYRIGHT ALL RIGHTS RESERVED PAGE 2 OF 20
, Enter the value of Z after Schedule C executes.
Initial values: X = 2, Y = 8, Z = 0 - ANS 24
Consider the following sequence of actions, listed in the order they are submitted to the DBMS:
T1:R(X),T2:W(X),T3:W(Y),T1:W(Y),T1:Commit, T2:Commit,T3:Commit
Does deadlock exists? - ANS NO
w1(x) r1(x) w3(z) c1 r2(x) r2(y) r4(z) c4 c2 r3(x) w3(y) c3
strict? - ANS NO
In the refined two-phase locking protocol, lock upgrading can take place - ANS during the
growing phase
Procedures that monitor actions such as changes to the database and cause an action to be
taken when certain conditions arise are called - ANS triggers
Given the above set of transactions. Complete the following statement
T2 executes _______. - ANS a phantom read
A bank stores checking account data in a database. The bank stores account owner data in a file
on a different computer. A database transaction creates a new owner in the file and assigns the
owner to a checking account in the database.
True/False
The transaction is always consistent. - ANS False
Select statement's 5 transaction boundary: - ANS Start and end
@COPYRIGHT ALL RIGHTS RESERVED PAGE 3 OF 20
QUESTIONS AND ANSWERS 100% PASS
Refer to the animation above and match the conflict type with the corresponding transactions.
T1 reads salaries of some Accounting department employees
T2 transfers Maria Rodriguez from Accounting to Development
T2 commits
T1 reads salaries of remaining Accounting employees
T1 computes and writes total salary of Accounting employees
T1 commits - ANS Phantom read
Initial values: X = 2, Y = 8, Z = 0
B and C are ________ schedules - ANS conflicting
If user needs to know only average department salaries for the Toy and CS departments, which
one should be used: the table or one of the views? - ANS Deptinfo
Assume existence of user Assistant Manager assistant. What privilege should you grant to
assistant who needs to know only average department salaries? Express it in proper SQL.
GRANT ______ ON Deptinfo TO assistant - ANS SELECT
@COPYRIGHT ALL RIGHTS RESERVED PAGE 1 OF 20
,Consider the following Schedule:
S = [R1(Z), W2(X), R2(Z), R2(Y), W1(X), W3(Z), W1(Y), R3(X)]
where Ri(Z)/Wi(Z) indicates a read/write by transaction i on data item Z.
Is the Schedule Serializable. - ANS YES
Enter the value of Z after the Schedule A executes.
Initial values: X = 2, Y = 8, Z = 0 - ANS 4
Execute each schedule and complete the given statements.
Initial vales: X = 2, Y = 8, Z = 0.
A and B are _________ Schedules. - ANS equivalent
The above direct graph is missing an edge, which one? - ANS T3->T1
Verifying the identity of a user is called - ANS authentication
After a rollback, the database restarts a transaction - ANS Sometimes
When a failure occurs, the database is notified and attempts to restart the transaction. -
ANS False
Select transaction's 5 isolation level - ANS READ UNCOMMITED
@COPYRIGHT ALL RIGHTS RESERVED PAGE 2 OF 20
, Enter the value of Z after Schedule C executes.
Initial values: X = 2, Y = 8, Z = 0 - ANS 24
Consider the following sequence of actions, listed in the order they are submitted to the DBMS:
T1:R(X),T2:W(X),T3:W(Y),T1:W(Y),T1:Commit, T2:Commit,T3:Commit
Does deadlock exists? - ANS NO
w1(x) r1(x) w3(z) c1 r2(x) r2(y) r4(z) c4 c2 r3(x) w3(y) c3
strict? - ANS NO
In the refined two-phase locking protocol, lock upgrading can take place - ANS during the
growing phase
Procedures that monitor actions such as changes to the database and cause an action to be
taken when certain conditions arise are called - ANS triggers
Given the above set of transactions. Complete the following statement
T2 executes _______. - ANS a phantom read
A bank stores checking account data in a database. The bank stores account owner data in a file
on a different computer. A database transaction creates a new owner in the file and assigns the
owner to a checking account in the database.
True/False
The transaction is always consistent. - ANS False
Select statement's 5 transaction boundary: - ANS Start and end
@COPYRIGHT ALL RIGHTS RESERVED PAGE 3 OF 20