Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit b8983e1

Browse files
committed
(GH-53) Add isolation section
1 parent a43c164 commit b8983e1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/rdbms/acid.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,22 @@ foreign key relationship.
7272
Isolation
7373
=========
7474

75-
.. todo: concurrent execution safe.
75+
Transactions are often executed concurrently (e.g. multiple transactions
76+
reading and writing to a table at the same time). Isolation ensures that
77+
concurrent execution of transactions leaves the database in the state that
78+
would have been obtained if the transactions were executed sequentially.
79+
Isolation is the main goal of concurrency control; depending on the isolation
80+
level used, the effects of an incomplete transaction might not be visible to
81+
other transaction.
82+
83+
For example, two persons have access to the same account having $1,000 on it,
84+
and both persons tries to get the money out of this account. Dora tries to
85+
get $1,000, and Toby tries to get $100.
86+
87+
The sum of the money to get out of the account is $1,100, which cause an issue
88+
of leaving negative amount of money. So, one of these transactions fails.
89+
90+
Isolation ensures the concurrent executions are safe.
7691

7792
Durability
7893
==========

0 commit comments

Comments
 (0)