Types of failures that causes a transaction to fail, Reasons for transaction failures, List the reasons for transaction failure in dbms, transaction failure
Types of failures that causes a transaction to fail
- Computer failure (System crash) – A hardware, software, or network error may cause a computer to fail or hang during an ongoing transaction.
- Transaction error – This error happens when user aborts the transaction, or logical programming error, or some operations like division by zero, etc.
- External causes, exception conditions – A transaction may be failed if necessary data not found, or an exception condition met. For example, customer A tries to purchase an item online. Assume that only two such items are available when A starts his transaction and both of them purchased by other customers. When A reaches end of the transaction, the items are not available hence the transaction is cancelled or failed.
- Concurrency control enforcement – If a transaction causes deadlock or violates serializability, then concurrency control schemes will force the transaction to abort.
- Disk failure - Some disk blocks may lose their data because of a read or write malfunction or because of a disk read/write head crash. This may happen during a read or a write operation of the transaction.