Explore topic-wise MCQs in Rdbms.

This section includes 29 Mcqs, each offering curated multiple-choice questions to sharpen your Rdbms knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following is not a type of a schedule?

A. Partial schedule
B. Dependent schedule
C. Recoverable schedule
D. None of the mentioned
Answer» E.
2.

If a schedule is equivalent to a serial schedule, it is called as a _________

A. Serializable schedule
B. Equivalent schedule
C. Committed schedule
D. None of the mentioned
Answer» B. Equivalent schedule
3.

_____ occurs when two transactions that access the same database items have their operations interleaved in a way that makes the value of some database items incorrect.

A. Starvation
B. Deadlock
C. Disk Failure
D. Lost update problem
Answer» E.
4.

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(i) T1 start(ii) T1 B old = 12000 new = 10000(ii) T1 M old = 0 new = 2000(iv) T1 commit(v) T2 start(vi) T2 B old = 10000 new = 10500(vii) T2 commitSuppose the database system crashed just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?

A. We must redo log record 6 set B to 10500
B. We must undo log record 6 to set B to 10000 and then redo log record 2 and 3
C. We need not redo log records 2 and 3 because transaction T1 has committed
D. We can apply redo and undo operations in arbitrary order because they are idempotent
Answer» C. We need not redo log records 2 and 3 because transaction T1 has committed
5.

In Database management system ACID property refers to:

A. Authenticity, Consistency, Isolation, and Durability
B. Atomicity, Consistency, Isolation, and Durability
C. Atomicity, Consistency, Integrity, and Durability
D. Atomicity, Confidentiality, Isolation, and Durability
Answer» C. Atomicity, Consistency, Integrity, and Durability
6.

Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable?

A. r1(x); r2(x); w1(x); r3(x); w2(x)
B. r2(x); r1(x); w2(x); r3(x); w1(x)
C. r3(x); r2(x); r1(x); w2(x); w1(x)
D. r2(x); w2(x); r3(x); r1(x); w1(x)
Answer» E.
7.

Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read operation on data item P is denoted by read(P) and the write operation on data item P is denoted by write(P)Time InstanceTransaction-idT1T21read(A) 2write(A) 3 read(C)4 write(C)5 read(B)6 write(B)7 read(A)8 Commit9read(B) Schedule S Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?

A. T2 must be aborted and then both T1 and T2 must be re-started to ensure transaction atomicity
B. Schedule S is non-recoverable and cannot ensure transaction atomicity
C. Only T2 must be aborted and then re-started to ensure transaction atomicity
D. Schedule S is recoverable and can ensure atomicity and nothing else needs to be done
Answer» C. Only T2 must be aborted and then re-started to ensure transaction atomicity
8.

Consider the following database schedule with two transactions, T1 and T2.S = r2(X); r1 (X); r2(Y); w1(X); r1 (Y); w2(X); a1; a2where ri(Z) denotes a read operation by transaction Ti on a variable Z, wi(Z) denotes a write operation by Ti on a variable Z and ai denotes an abort by transaction Ti.Which one of the following statements about the above schedule is TRUE?

A. S is non-recoverable
B. S is recoverable, but has a cascading abort
C. S does not have a cascading abort
D. S is strict
Answer» D. S is strict
9.

Consider the transactions T1, T2, and T3 and the schedules S1 and S2 given below.T1: r1(X); r1(Z); w1(X); w1(Z)T2: r2(Y); r2(Z); w2(Z)T3: r3(Y); r3(X); w3(Y)S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z)S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z)Which one of the following statements about the schedules is TRUE?

A. Only S1 is conflict-serializable
B. Only S2 is conflict-serializable
C. Both S1 and S2 are conflict-serializable
D. Neither S1 nor S2 is conflict-serializable
Answer» B. Only S2 is conflict-serializable
10.

ACID properties of a transactions are

A. Atomicity, consistency, isolation, database
B. Atomicity, consistency, isolation, durability
C. Atomicity, consistency, integrity, durability
D. Atomicity, consistency, integrity, database
Answer» C. Atomicity, consistency, integrity, durability
11.

Consider the following transaction involving two bank accounts x and y.read (x); x := x – 50 ; write (x) ; read (y) ; y≔ y + 50 ; write (y)The constraint that the sum of the accounts x and y should remain constant is that of

A. Atomicity
B. Consistency
C. Isolation
D. Durability
Answer» C. Isolation
12.

Let S be the following schedule of operations of three transactions T1, T2 and T3 in a relational database system:R2(Y), R1(X), R3(Z), R1(Y), W1(X), R2(Z), W2(Y), R3(X), W3(Z)Consider the statements P and Q below:P: S is conflict-serializable.Q: If T3 commits before T1 finishes, then S is recoverable.Which one of the following choices is correct?

A. P is true and Q is false.
B. Both P and Q are true.
C. P is false and Q is true.
D. Both P and Q are false.
Answer» B. Both P and Q are true.
13.

Consider a simple checkpointing protocol and the following set of operations in the log.(start, T4); (write, T4, y, 2, 3); (start, T1); (commit, T4); (write, T1, z, 5, 7); (checkpoint);(start, T2); (write, T2, x, 1, 9); (commit, T2); (start, T3), (write, T3, z, 7, 2);If a crash happens now and the system tries to recover using both undo and redo operations, what are the contents of the undo list and the redo list?

A. Undo: T3, T1; Redo: T2
B. Undo: T3, T1; Redo: T2, T4
C. Undo: none; Redo: T2, T4, T3, T1
D. Undo: T3, T1, T4; Redo: T2
Answer» B. Undo: T3, T1; Redo: T2, T4
14.

Let ri(z) and wi(z) denote read and write operations respectively on a data item z by a transaction Ti. Consider the following two schedules.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 one of the following options is correct?

A. S1 is conflict serializable, and S2 is not conflict serializable.
B. S1 is not conflict serializable, and S2 is conflict serializable.
C. Both S1 and S2 are conflict serializable.
D. Neither S1 nor S2 is conflict serializable.
Answer» C. Both S1 and S2 are conflict serializable.
15.

Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item X, denoted by r(X) and w(X) respectively. Which one of them is conflict serializable ?S1 : r1(X); r2(X); w1(X); r3(X); w2(X)S2 : r2(X); r1(X); w2(X); r3(X); w1(X)S3 : r3(X); r2(X); r1(X); w2(X); w1(X)S4 : r2(X); w2(X); r3(X); r1(X); w1(X)

A. S1
B. S2
C. S3
D. S4
Answer» E.
16.

Consider the following schedule S of transactions T1, T2, T3, T4:T1T2T3T4 Reads(X) Writes(X)Commit Writes(X) Commit Writes(Y)Reads(Z)Commit Reads(X)Reads(Y)Commit Which one of the following statements is CORRECT?

A. S is conflict-serializable but not recoverable
B. S is not conflict-serializable but is recoverable
C. S is both conflict-serializable and recoverable
D. S is neither conflict-serializable not is it recoverable
Answer» D. S is neither conflict-serializable not is it recoverable
17.

Consider a schedule of transactions T1 and T2:T1RA RC WD WBCommit T2 RBWB RD WC Commit Here, RX stands for “Read(X)” and WX stands for “Write(X)”.Which one of the following schedules is conflict equivalent to the above schedule?

A. T1 RARCWDWB Commit T2RBWBRD WC Commit
B. T1RARCWDWB Commit T2 RBWBRDWC Commit
C. T1RARCWD WB Commit T2 RBWBRD WC Commit
D. T1 RARCWDWBCommit T2RBWBRDWC Commit
Answer» B. T1RARCWDWB Commit T2 RBWBRDWC Commit
18.

Consider a Simple Checkpointing Protocol and the following set of operations in the log.(start, T4); (write, T4, y, 2, 3); (start, T1); (commit, T4); (write, T1, z, 5, 7); (Checkpoint);(start, T2); (write, T2, x, 1, 9); (commit, T2); start, T3); (write, T3, z, 7, 2); if a crash happens now and the system tries to recover using both undo and redo operations, what are the contents of the undo list and the redo list?

A. Undo : T3, T1; Redo T2
B. Undo : T3, T1; Redo T2, T4
C. Undo : none; Redo T2, T4, T3, T1
D. Undo : T3, T1, T4; Redo T2
Answer» B. Undo : T3, T1; Redo T2, T4
19.

Consider the following schedules for transactions T1, T2 and T3T1T2T3Read (X) Read (Y) Ready (Y) Write (Y) Write (X) Write (X) Read (X) Write (X) The correct schedule of serialization will be

A. T1 → T2 → T3
B. T2 → T3 → T1
C. T3 → T1 → T2
D. T­1 → T3 → T2
Answer» E.
20.

Let us assume that transaction T1 has arrived before transaction T2. Consider the scheduleS=r1(A); r2(B) ; w2(A); w1(B)Which of the following is true?

A. Allowed under basic timestamp protocol.
B. Not allowed under basic timestamp protocols because T1 is rolled
C. Not allowed under basic timestamp protocols because T2 is rolled back,
D. None of these
Answer» C. Not allowed under basic timestamp protocols because T2 is rolled back,
21.

WHICH_OF_THE_FOLLOWING_IS_NOT_A_TYPE_OF_A_SCHEDULE??$

A. Partial schedule
B. Dependent schedule
C. Recoverable schedule
D. None of the mentioned
Answer» E.
22.

If a schedule is equivalent to a serial schedule, it is called as a ________?

A. Serializable schedule
B. Equivalent schedule
C. Committed schedule
D. None of the mentioned
Answer» B. Equivalent schedule
23.

The average time for a transaction to be completed after it has been submitted is called as __________

A. Minimum response time
B. Average response time
C. Average reaction time
D. Minimum reaction time
Answer» C. Average reaction time
24.

Which of the following are the advantages of transaction concurrency?

A. Increased throughput
B. Increased utilization
C. Reduces average response time
D. All of the mentioned
Answer» E.
25.

State true or false: Transactions can only run serially

A. True
B. False
Answer» C.
26.

A ___________ is one where, for each pair of transactions Ti and Tj such that Tj reads a data item previously written by Ti , the commit operation of Ti appears before the commit operation of Tj

A. Partial schedule
B. Dependent schedule
C. Recoverable schedule
D. None of the mentioned
Answer» D. None of the mentioned
27.

State true or false: Every cascadeless schedule is also recoverable

A. True
B. False
Answer» B. False
28.

The phenomenon in which one failure leads to a series of transaction rollbacks is called as ________

A. Cascading rollback
B. Cascadeless rollback
C. Cascade cause
D. None of the mentioned
Answer» B. Cascadeless rollback
29.

A transaction that performs only one operation is called as a _________

A. Partial schedule
B. Complete schedule
C. Dependent schedule
D. Independent schedule
Answer» B. Complete schedule