Skip to content

Commit

Permalink
more on databases
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafah15 committed Jul 16, 2023
1 parent 0e77142 commit c459a35
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pages/ACID.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ title: ACID
- If the multiple transactions are running concurrently, they should not be affected by each other; the result should be the same as the result obtained if the transactions were running sequentially.
- [[database isolation]]
- **Durability**
- Changes that have been committed to the database should remain even in the case of the software and hardware failure. for instance if x account contains 10$ this information should not disappear upon hardware or software failure.
- Changes that have been committed to the database should remain even in the case of software and hardware failure. for instance, if x account contains 10$ this information should not disappear upon hardware or software failure.
- [[database durability]]
-
6 changes: 6 additions & 0 deletions pages/database durability techniques.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- WAL - write-ahead log
- writing a lot of data to disk is expensive, which is why DBMSs persist a compressed version of the changes known as WAL
- asynchronous snapshot
- In this approach everything we write is kept in-memory and later on, asynchronously, it’s snapshot is synced/ written to the drive (persisted disk/ SSD/ Hard-drive) all at once.
- AOF - append-only file
- Very similar to the WAL strategy, It keeps track of only the changes happening. A very lightweight way of storing the changes and also gives the possibility of reconstructing the state of the system in case of failures.
6 changes: 6 additions & 0 deletions pages/database durability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- the process of ensuring persisting transaction permanently and do not accidentally disappear or get erased even during a database crash.
- durability actions are slow because to make things durable that means you write to disk and writing to the disk is slow.
- this means changes made by committed transactions must be persisted in a durable non-volatile storage.
- [[database durability techniques]]
- os cache
- most of DBMSs bypass the os cache to ensure durability by fsync os which can be expensive and slow down commits
3 changes: 1 addition & 2 deletions pages/database isolation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- can my inflight transaction see changes made by other transactions?
- [[database read phenomenas]]
- [[database isolation levels]]
-
- [[database isolation levels]]

0 comments on commit c459a35

Please sign in to comment.