Transactions & Concurrency

JKSSB Sub-Inspector (Telecommunication) · Database Management Systems · 18 practice questions with answers and explanations: 9 Easy, 9 Medium, 0 Hard.

Sample questions

Sample Easy question 1

A transaction is:

  1. A type of index
  2. A single table
  3. A logical unit of work made of one or more database operations
  4. A backup file
Show answer

Answer: C. For example, a bank transfer is one transaction made of a debit and a credit.

Sample Easy question 2

Which problem occurs when two transactions overwrite each other's updates to the same item?

  1. Dirty write protection
  2. Lost update
  3. Deadlock prevention
  4. Phantom row
Show answer

Answer: B. Without proper locking, one update is silently lost.

Sample Easy question 3

In the context of locks, which one allows several transactions to read an item but none to write it?

  1. Exclusive lock
  2. Intent lock alone
  3. Shared lock
  4. Gap lock alone
Show answer

Answer: C. A shared (read) lock is compatible with other shared locks, unlike an exclusive (write) lock.

Sample Medium question 4

What does a SAVEPOINT allow in a transaction?

  1. Saving the table as a file
  2. Committing every future change
  3. Rolling back to a chosen point without undoing the whole transaction
  4. Locking the entire database
Show answer

Answer: C. ROLLBACK TO savepoint undoes only the later work.

Sample Medium question 5

A schedule is 'serializable' if its result is equivalent to:

  1. Running alone the first transaction
  2. Running all transactions at the same instant
  3. Some serial (one-after-another) execution of the same transactions
  4. Running the transactions in random order, whatever the result
Show answer

Answer: C. Serializability is the standard correctness criterion for concurrent schedules.

Sample Medium question 6

What does the 'WAL' (write-ahead logging) rule require?

  1. Data pages must be written before the log
  2. Every write must be followed by a read
  3. Log records must be written to stable storage before the changed data pages
  4. No log is needed if backups exist
Show answer

Answer: C. WAL gives durability and the ability to undo or redo changes after a crash.

More Database Management Systems topics for JKSSB Sub-Inspector (Telecommunication)

Related articles