1.

What do you understand by database transactions?

Answer»

A database transaction is DEFINED as a task sequence that is to be performed on the database to achieve the REQUIRED results logically. The task can include creating, DELETING, updating the records in the database tables. The tasks upon successful completion affect the records in the database. A transaction provides 4 controls as listed below:

  • COMMIT: This is used for saving all changes done utilizing the transaction. We generally use this post INSERT, UPDATE, DELETE statements.
  • ROLLBACK: This is used for rolling back the transaction to the previous state before it was operated. We generally use this post INSERT, UPDATE, DELETE statements.
  • SAVEPOINT: This is used for setting the point where the transaction is supposed to ROLL back.
  • SET TRANSACTION: This is used for setting the name of the transaction.


Discussion

No Comment Found