The exam is on Friday the 16th of May at 16-20 in class Porthania I.
1. The consistency constraints placed on the database require the values of X and Y to be equal. Consider the following schedule of transactions {T1, T2, T3}:
T1: read(X,v); T1: v:=v+1; T1: write(X,v); T2: read(X,w); T2: write(Y,w); T2: commit; T3: read(Y,p); T1: abort; T3: write(Z,p); T3:commit; |
|
2. Consider the following schedule of transactions T1 and T2:
1 T1: read(X,v); 2 T2: read(X,u); 3 T1: write(X,v); 4 T1: read(Y,z); 5 T2: read(X,w); 6 T2: write(X,w); 7 T1: write(Y,z); 8 T1: commit; 9 T2: commit; |
|
3. The database management system uses strict two-phase locking. Elements that are locked are pages. What locks are taken and when to carry out the following transaction
begin transaction; update EMPLOYEE set SALARY = SALARY + 500 where DEPARTMENT = 5; commit transaction.a) when relation EMPLOYEE is implemented as a heap.,
4. The database management system uses strict two-phase locking. Elements that are locked are pages. What locks are taken and when to carry out the following transaction
begin transaction update EMPLOYEE set SALARY = SALARY + 500 where EMP_NO=301123 commit transaction.when the table is implemented as an ISAM structure?
5. A common tehcnique in maintaining databases is to fetch a collection of rows into the workspace a a client computer, show the rows to the user that may then modify some of them. The changed made by the user are then registered in the database. How should the operations be divided into transactions? What isolation level and what kind of locking should be used?