Adbase H1 Midterms Flashcards
a collection of operations that form a single logical unit of work.
Transaction
the equivalent of a single SQL statement in an application program or transaction
database request
Satisfies the constraints specified in the schema
database consistent state
A DBMS uses this to keep track of all the transactions that update the database.
Transaction log
requires that all operations (SQL request) of a transaction should be completed.
Atomacity
ensures that only valid data following all rules and constraints will be written in the database.
Consistency
ensures that once transaction changes are done and committed, they cannot be undone or lost.
Durability
The data used during the execution of a current transaction cannot be used by another transaction until the first one is completed.
Isolation
if the transaction fails after step 3, and before step 6, the system should ensure that its updates are not reflected in the database, an inconsistency will result.
Atomicity requirement
The sum of Aldous account and Brendon’s account is unchanged by the execution of the transaction.
Consistency requirement
Transactions should be run sequentially. Therefore, no other transaction will happen on both accounts until the current transaction is completed.
Isolation requirement
Once the user has been notified that the transaction has completed( the transfer of the P1000 has taken place), the updates to the database by the transaction must persist despite failures.
Durability requirement
This marks the beginning of transaction execution.
BEGIN TRANSACTION
this signals a successful end of the transaction so that any changes (updates) executed by the transaction can be safely committed to the database and will not be undone.
COMMIT
This signals that the transaction has ended unsuccessfully so that any changes or effects that the transaction may have applied to the database must be undone.
ROLLBACK TRANSACTION
is a point in a transaction when you can roll the transaction back to a certain point without rolling back the entire transaction.
SAVE TRANSACTION
returns the number of BEGIN TRANSACTION statements that have occurred on the current connection.
@@TRANCOUNT
in this state, a transaction stays in this state to perform READ and WRITE operations.
Active state
where the final statement in queries has been executed
Partially committed state