A transaction can have one of two outcomes. If it completes successfully, the transaction
is said to have committed and the database reaches a new consistent state. On the other
hand, if the transaction does not execute successfully, the transaction is aborted. If a trans-action is aborted, the database must be restored to the consistent state it was in before the
transaction started. Such a transaction is rolled back or undone. A committed transaction
cannot be aborted. If we decide that the committed transaction was a mistake, we must
perform another compensating transaction to reverse its effects (as we discuss in Sec-tion 20.4.2). However, an aborted transaction that is rolled back can be restarted later and,
depending on the cause of the failure, may successfully execute and commit at that time.