Transaction Atomicity, Consistency, and Isolation
Locking and transaction logs are used to ensure ACID semantics as a transaction modifies data in a database.
-
Locking: TimesTen acquires locks on data items that the transaction writes and, depending on the transaction isolation level, data items that the transaction reads. See Concurrency Control Through Isolation and Locking.
-
Transaction logging: All TimesTen transactions are atomic. Either all or none of the effects of the transaction are applied to the database. Modifications to the database are recorded in a transaction log. Atomicity is implemented by using the transaction log to undo the effects of a transaction if it is rolled back. Rollback can be caused explicitly by the application or during database recovery because the transaction was not committed at the time of failure. See Transaction Logging.
The following table shows how TimesTen uses locks and transaction logs:
| If | Then |
|---|---|
|
Transaction is terminated successfully (committed) |
|
|
Transaction is rolled back |
|
|
System fails (data not committed) |
|
|
Application fails |
|