A transaction is the execution of a sequence of one or more operations (e.g., SQL queries) on a database to perform some higher-level function.
It is the basic unit of change in a DBMS → Partial transactions are not allowed!
The DBMS is only concerned about what data is read/written from/to the database.
⇒ Changes to the "outside world" are beyond the scope of the DBMS.
<aside> 💡 Definitions
Database → A fixed set of named data objects (e.g., A
, B
, C
, …)
Transaction → A sequence of read and write operations ( R(A)
, W(B)
, …)
A txn starts with the BEGIN
command and stops with either COMMIT
or ABORT
</aside>
Like the black box in airplanes. Used for both audit trail and efficiency reasons
Super slow and problematic