Unit 6 - Practice Quiz

INT306

1 A logical unit of database processing that includes one or more database access operations is known as:

A. A Schedule
B. A Transaction
C. A Lock
D. A Timestamp

2 Which of the following is NOT one of the ACID properties of database transactions?

A. Atomicity
B. Consistency
C. Integrity
D. Durability

3 The property that ensures that all operations of a transaction are reflected in the database or none are is called:

A. Atomicity
B. Consistency
C. Isolation
D. Durability

4 Which component of the DBMS is primarily responsible for ensuring the Durability property?

A. Concurrency Control Manager
B. Query Optimizer
C. Recovery Manager
D. Buffer Manager

5 If a transaction executes updates on rows that are being read by another transaction concurrently, violating the logical correctness of data, which property is compromised?

A. Atomicity
B. Consistency
C. Isolation
D. Durability

6 In a state transition diagram of a transaction, a transaction enters the Committed state after:

A. The first operation is executed
B. All operations are executed and the final check passes
C. A system failure occurs
D. The transaction is rolled back

7 A transaction that has not yet completed all its operations but has executed the final statement is in which state?

A. Active
B. Partially Committed
C. Committed
D. Aborted

8 Which of the following operations is used to permanently save the work done by a transaction?

A. ROLLBACK
B. COMMIT
C. SAVEPOINT
D. GRANT

9 A schedule in a DBMS is defined as:

A. A list of all transactions in the system
B. The chronological order in which instructions of concurrent transactions are executed
C. The time taken to execute a query
D. The priority list of users

10 In a Serial Schedule:

A. Operations of different transactions are interleaved
B. Transactions are executed one after another without interleaving
C. Parallel processing is maximized
D. Deadlocks are frequent

11 Consider two transactions and . A conflict exists if:

A. They belong to different schedules
B. They access different data items
C. They access the same data item, belong to different transactions, and at least one operation is a write
D. They access the same data item and both are read operations

12 Which of the following pairs of operations is NOT conflicting?

A. and
B. and
C. and
D. and

13 A schedule is Conflict Serializable if:

A. It is view equivalent to a serial schedule
B. It is conflict equivalent to a serial schedule
C. It contains no read operations
D. It results in a deadlock

14 To test for Conflict Serializability, we construct a Precedence Graph. A cycle in this graph implies:

A. The schedule is conflict serializable
B. The schedule is NOT conflict serializable
C. The schedule is view serializable
D. The schedule is recoverable

15 In a precedence graph for schedule , a directed edge is drawn if:

A. commits before
B. reads data written by (or similar conflicting op where is first)
C. and do not conflict
D. starts before

16 What is the relationship between View Serializability () and Conflict Serializability ()?

A. (Every conflict serializable schedule is view serializable)
B. (Every view serializable schedule is conflict serializable)
C.
D. and are disjoint

17 A Blind Write occurs when:

A. A transaction writes a value without reading it first
B. A transaction reads a value but never writes it
C. A transaction writes to a log file only
D. A transaction writes data encrypted

18 Two schedules and are View Equivalent if they satisfy conditions regarding:

A. Initial reads, Updated reads, and Final writes
B. Only Initial reads
C. Only Final writes
D. Locking protocols

19 A schedule is Recoverable if:

A. For every transaction that reads from , commits after commits
B. For every transaction that reads from , commits after commits
C. There are no cascading rollbacks
D. Deadlocks are automatically resolved

20 A Dirty Read occurs when:

A. A transaction reads a value written by a committed transaction
B. A transaction reads a value written by an uncommitted transaction
C. A transaction reads a value twice and gets different results
D. A transaction overwrites a value

21 Which phenomenon leads to Cascading Rollback?

A. A committed transaction reading committed data
B. An uncommitted transaction reading data written by a transaction that subsequently fails
C. Strict locking protocols
D. Timestamp ordering

22 A Cascadeless Schedule (ACA - Avoid Cascading Aborts) ensures that:

A. Transactions only read data written by committed transactions
B. Transactions commit in the order they started
C. No transaction is ever aborted
D. Transactions never write to the same data item

23 A Strict Schedule requires that:

A. A transaction can neither read nor write a data item until the last transaction that wrote has committed or aborted
B. A transaction can read but not write until the previous writer commits
C. Transactions must be executed serially
D. Strict 2PL is not used

24 Which of the following implies the highest level of isolation and easiest recovery?

A. Recoverable Schedule
B. Cascadeless Schedule
C. Strict Schedule
D. Serial Schedule

25 The Lost Update problem occurs when:

A. Two transactions read the same data and update it based on the read value, overwriting each other's changes
B. A transaction reads uncommitted data
C. A transaction reads the same data twice and gets different values
D. A transaction fails to write to the log

26 Concurrency Control schemes are designed primarily to ensure:

A. Database security
B. Isolation and Serializability
C. Atomicity
D. Durability

27 A Lock is a variable associated with a data item that describes:

A. The size of the data item
B. The status of the data item with respect to operations that can be performed
C. The physical location of the data
D. The value of the data

28 In Shared/Exclusive locking mode, which statement is true?

A. Shared Lock (S) allows Read and Write; Exclusive Lock (X) allows Write only
B. Shared Lock (S) allows Read only; Exclusive Lock (X) allows Read and Write
C. Shared Lock (S) allows Write only; Exclusive Lock (X) allows Read only
D. Both allow Read and Write

29 If a transaction holds an Exclusive Lock (X) on item , can another transaction request a Shared Lock (S) on ?

A. Yes, immediately
B. No, it must wait
C. Yes, but only for reading
D. No, unless it upgrades

30 The Two-Phase Locking (2PL) protocol consists of which two phases?

A. Reading Phase and Writing Phase
B. Growing Phase and Shrinking Phase
C. Beginning Phase and Ending Phase
D. Locking Phase and Unlocking Phase

31 The primary benefit of the Two-Phase Locking (2PL) protocol is that it guarantees:

A. Freedom from Deadlocks
B. Conflict Serializability
C. View Serializability only
D. Freedom from Cascading Rollbacks

32 In Strict Two-Phase Locking (Strict 2PL):

A. All locks are released at once at the end of the transaction
B. Exclusive locks are held until the end of the transaction, but Shared locks can be released earlier
C. Locks can be released anytime
D. No locks are used

33 What is Lock Upgrading?

A. Converting an Exclusive lock to a Shared lock
B. Converting a Shared lock to an Exclusive lock
C. Releasing all locks
D. Assigning a lock to a higher priority transaction

34 A Deadlock occurs when:

A. A transaction waits indefinitely for a lock held by another transaction, which is in turn waiting for the first
B. A transaction fails due to hardware error
C. The system runs out of memory
D. Two transactions read the same data

35 Which of the following is a method for Deadlock Prevention?

A. Wait-For Graph
B. Wait-Die Scheme
C. Timeout
D. Precedence Graph

36 In the Wound-Wait deadlock prevention scheme:

A. Older transactions wait for younger ones
B. Younger transactions wound (abort) older ones
C. Older transactions wound (abort) younger transactions holding the lock
D. Transactions never wait

37 A Wait-For Graph is used for:

A. Deadlock Prevention
B. Deadlock Detection
C. Serializability Testing
D. Recovery

38 Starvation in concurrency control refers to:

A. A state where the system halts
B. A transaction waiting indefinitely while others proceed
C. Memory leakage
D. Database corruption

39 In Timestamp Ordering protocols, what is ?

A. Total Size of transaction
B. Time Spent by transaction
C. Timestamp assigned to transaction at startup
D. Temporary Space for

40 In the Basic Timestamp Ordering protocol, if transaction wants to write item , and , what happens?

A. The operation is allowed
B. The operation is delayed
C. Transaction is rolled back (aborted)
D. The read timestamp is updated

41 What is the Thomas Write Rule?

A. A modification to 2PL
B. A modification to Timestamp Ordering that ignores outdated writes
C. A rule for logging
D. A rule for locking

42 Which of the following describes the Phantom Phenomenon?

A. Reading a value that disappears
B. A transaction executes a range query twice and finds a new row inserted by another transaction in between
C. A system crash causing data loss
D. Locks appearing without requests

43 Granularity in locking refers to:

A. The size of the data item that is locked (e.g., row, page, table)
B. The duration of the lock
C. The strength of the lock
D. The number of locks allowed

44 What are Intention Locks (e.g., IS, IX) used for?

A. To signal the intention to lock nodes lower in the hierarchy (finer granularity)
B. To lock the database permanently
C. To replace exclusive locks
D. To prevent deadlocks

45 Optimistic Concurrency Control assumes that:

A. Conflicts are rare, so validation is done at the end
B. Conflicts are frequent, so locking is used
C. Transactions should strictly wait
D. Deadlocks are inevitable

46 The Validation Phase in optimistic concurrency control checks for:

A. Syntax errors
B. Serializability violations
C. Disk space
D. User permissions

47 Which of the following is true about Multiversion Concurrency Control (MVCC)?

A. It maintains multiple copies of data items (versions) to allow readers to read old versions without blocking writers
B. It uses only one version of data
C. It strictly forbids concurrent access
D. It is identical to 2PL

48 In a database, the Log is a sequence of records that maintains:

A. User login times
B. History of all updates to the database for recovery purposes
C. Query execution plans
D. Index structures

49 A schedule involves transactions and . writes item . reads . If aborts, must abort. This dependency is called:

A. Abort Dependency
B. Commit Dependency
C. Lock Dependency
D. View Dependency

50 In the context of database recovery, what does WAL stand for?

A. Write-After-Log
B. Write-Ahead-Logging
C. Wait-And-Lock
D. Write-All-Logs