Transactions and concurrency control (original) (raw)

**Consider the following transactions with data items P and Q initialized to zero:

T1: read (P) ;
read (Q) ;
if P = 0 then Q : = Q + 1 ;
write (Q) ;
T2: read (Q) ;
read (P) ;
if Q = 0 then P : = P + 1 ;
write (P) ;

**Any non-serial interleaving of T1 and T2 for concurrent execution leads to

Consider the following schedule for transactions T1, T2 and T3:

Which one of the schedules below is the correct serialization of the above?

Let us assume that transaction T1 has arrived before transaction T2. Consider the schedule

S=r1(A); r2(B) ; w2(A); w1(B)

Which of the following is true?

Which of the following concurrency control protocol ensures both conflict serializability and free from deadlock?

Which one of these is characteristic of RAID 5?

Consider following schedules involving two transactions: S1 : r1(X); r1(Y); r2(X); r2(Y); w2(Y); w1(X) S2 : r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X) Which of the following statement is true?

Consider the following relation:

Works (emp_name, company_name, salary)

Here, emp_name is primary key. Consider the following SQL query

Select emp_name From works T where salary > (select avg (salary) from works S where T.company _ name = S.company _ name)

The above query is for following :

Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and then apply a 5% interest. 1. T1 start 2. T1 B old=1200 new=10000 3. T1 M old=0 new=2000 4. T1 commit 5. T2 start 6. T2 B old=10000 new=10500 7. T2 commit Suppose the database system crashes just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?

Consider the table R with attributes A, B and C. The functional dependencies that hold on R are : A → B, C → AB. Which of the following statements is/are True ? I. The decomposition of R into R1(C, A) and R2(A, B) is lossless. II. The decomposition of R into R1(A, B) and R2(B, C) is lossy.

Consider a schedule S generated by the basic Timestamp Ordering (TO) protocol. Which of the following statements is CORRECT regarding the recoverability and cascading rollback anomalies in S?

****(GATE 2012 | MCQ | 1-Mark)**

There are 48 questions to complete.

Take a part in the ongoing discussion