A transaction is a unit of work or unit of work performed in a DB system.
The result of the transaction is either “commit” or “rollback”.
Commit is a process that is executed when there is no problem with all the processes in the transaction. Execution will confirm the processing, and the result of the transaction will be reflected in the DB. You can not roll back committed data.
Rollback is a process that is executed when a problem occurs in the processing of a transaction. When executed, data is returned until the transaction start time. Rollback is not process(SQL) unit in a transaction. It is done on a transaction basis.