📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      What is a 'transaction' in DBMS and what does 'COMMIT'

      do?
      A A transaction is a single SQL query which is executed by the user; COMMIT executes multiple queries Correct Answer Incorrect Answer
      B A transaction is a database backup operation; COMMIT creates a checkpoint to validate a transaction Correct Answer Incorrect Answer
      C A transaction is a logical unit of work comprising one or more database operations that must execute atomically; COMMIT permanently saves all changes made in the current transaction Correct Answer Incorrect Answer
      D A transaction is the process of connecting to a database and executing the queries; COMMIT closes the connection once the SQL is executed Correct Answer Incorrect Answer
      E A transaction is a stored procedure execution; COMMIT compiles the stored procedure Correct Answer Incorrect Answer

      Solution

      A bank transfer is a classic transaction: debit Account A and credit Account B must both succeed or both fail (atomicity). COMMIT makes changes permanent and visible to other transactions. ROLLBACK undoes all changes since the last COMMIT. SAVEPOINT marks a partial rollback point. Without proper transaction management, a system crash mid-transfer could debit one account without crediting the other which is catastrophic in banking.

      Practice Next

      Relevant for Exams:

      ask-question