Q#1: A database transaction is:
(A) A single read operation
(B) A sequence of operations performed as a single unit of work
(C) Only an insert operation
(D) Only an update operation
Answer: (B) A sequence of operations performed as a single unit of work
Q#2: Which property of transactions ensures all operations are completed or none at all?
(A) Atomicity
(B) Consistency
(C) Isolation
(D) Durability
Answer: (A) Atomicity
Q#3: The āCā in ACID properties of transactions stands for:
(A) Concurrency
(B) Consistency
(C) Control
(D) Completion
Answer: (B) Consistency
Q#4: Isolation property ensures:
(A) Transaction is indivisible
(B) Intermediate results of a transaction are invisible to other transactions
(C) Database remains consistent
(D) Transaction results are permanent
Answer: (B) Intermediate results of a transaction are invisible to other transactions
Q#5: Durability property ensures:
(A) Changes are permanent even after system crash
(B) Transaction can be undone
(C) Transactions run sequentially
(D) Database is normalized
Answer: (A) Changes are permanent even after system crash
Q#6: A transaction can be ended by:
(A) COMMIT
(B) ROLLBACK
(C) Both A and B
(D) SELECT
Answer: (C) Both A and B
Q#7: COMMIT operation:
(A) Saves all changes made by the transaction
(B) Reverts changes
(C) Deletes table
(D) Creates table
Answer: (A) Saves all changes made by the transaction
Q#8: ROLLBACK operation:
(A) Saves changes
(B) Reverts changes made by transaction
(C) Deletes table
(D) Updates schema
Answer: (B) Reverts changes made by transaction
Q#9: Which problem occurs when two transactions read and write the same data simultaneously causing inconsistency?
(A) Lost update
(B) Dirty read
(C) Uncommitted dependency
(D) All of the above
Answer: (D) All of the above
Q#10: A lost update occurs when:
(A) Two transactions update same data concurrently, one update is lost
(B) Transaction reads uncommitted data
(C) Transaction is rolled back
(D) None
Answer: (A) Two transactions update same data concurrently, one update is lost
Q#11: Dirty read occurs when:
(A) Transaction reads uncommitted changes of another transaction
(B) Transaction updates same row twice
(C) Transaction deletes data
(D) Transaction is committed
Answer: (A) Transaction reads uncommitted changes of another transaction
Q#12: Uncommitted dependency (or temporary inconsistency) occurs when:
(A) A transaction depends on uncommitted changes of another
(B) Transaction is rolled back
(C) Transaction reads committed data only
(D) Transaction is lost
Answer: (A) A transaction depends on uncommitted changes of another
Q#13: Transaction management ensures:
(A) Data integrity
(B) Consistency in multi-user environment
(C) Atomicity
(D) All of the above
Answer: (D) All of the above
Q#14: Serializability ensures:
(A) Transactions produce the same result as if executed serially
(B) Transactions are committed
(C) Transactions are atomic
(D) Transactions are durable
Answer: (A) Transactions produce the same result as if executed serially
Q#15: Concurrency control prevents:
(A) Deadlocks
(B) Inconsistent data due to concurrent transactions
(C) Both A and B
(D) Only updates
Answer: (C) Both A and B
Q#16: Two-phase locking protocol ensures:
(A) Isolation
(B) Atomicity
(C) Consistency
(D) Durability
Answer: (A) Isolation
Q#17: A deadlock occurs when:
(A) Two transactions wait indefinitely for resources held by each other
(B) Transaction is committed
(C) Transaction is rolled back
(D) Database crashes
Answer: (A) Two transactions wait indefinitely for resources held by each other
Q#18: Timestamp ordering protocol is used for:
(A) Concurrency control
(B) Backup
(C) Recovery
(D) Indexing
Answer: (A) Concurrency control
Q#19: Checkpointing is used in transaction management for:
(A) Recovery in case of failure
(B) Concurrency control
(C) Deadlock prevention
(D) Normalization
Answer: (A) Recovery in case of failure
Q#20: Undo log stores:
(A) Old values before update
(B) New values after update
(C) Transaction start time
(D) Commit time
Answer: (A) Old values before update
Q#21: Redo log stores:
(A) Old values
(B) New values to redo changes after crash
(C) Transaction IDs
(D) Locks
Answer: (B) New values to redo changes after crash
Q#22: Savepoints are used to:
(A) Rollback partially in a transaction
(B) Commit transaction
(C) Delete table
(D) Update schema
Answer: (A) Rollback partially in a transaction
Q#23: A long transaction is:
(A) Transaction that takes longer time to complete
(B) Transaction that updates only one row
(C) Transaction with no commit
(D) Transaction with no rollback
Answer: (A) Transaction that takes longer time to complete
Q#24: A short transaction is:
(A) Transaction that completes quickly
(B) Transaction that never commits
(C) Transaction that never rolls back
(D) Transaction that locks entire database
Answer: (A) Transaction that completes quickly
Q#25: Dirty write occurs when:
(A) Two transactions update the same data concurrently before commit
(B) Transaction reads committed data
(C) Transaction is rolled back
(D) None
Answer: (A) Two transactions update the same data concurrently before commit
Q#26: Cascading rollback occurs when:
(A) Rollback of one transaction causes rollback of others dependent on it
(B) Transaction commits successfully
(C) Database crashes
(D) Transaction is lost
Answer: (A) Rollback of one transaction causes rollback of others dependent on it
Q#27: Transaction schedule defines:
(A) Order of execution of operations of transactions
(B) Time of commit
(C) Number of rows
(D) Index structure
Answer: (A) Order of execution of operations of transactions
Q#28: Recoverable schedule ensures:
(A) Transactions commit only after other dependent transactions commit
(B) Transactions rollback
(C) Deadlock occurs
(D) No concurrency
Answer: (A) Transactions commit only after other dependent transactions commit
Q#29: Cascadeless schedule ensures:
(A) No transaction reads uncommitted data
(B) All transactions read uncommitted data
(C) Deadlock occurs
(D) Transaction fails
Answer: (A) No transaction reads uncommitted data
Q#30: Main goal of transaction management is:
(A) Data integrity, consistency, concurrency, and durability
(B) Only backup
(C) Only concurrency
(D) Only security
Answer: (A) Data integrity, consistency, concurrency, and durability