Data Base
Single-User System:
Multiuser System:
Concurrency
read_item(X)
write_item(X)
Lost Update Problem
(T1 的 X = X - N 白做)
Temporary Update Problem
(T1 失敗需要轉回原本的 X,但T2先讀取 temporary 的值)
Incorrect Summary Problem
(T3 在 X -N 後讀取 X, 在 Y + N 之前讀取 Y, 造成 X + Y 錯誤)
begin_transaction: 標記 transaction 執行開始
read or write: 定義 read and write operation on the database items
end_transaction: 標記 transaction 執行結束
commit_transaction: 表示 transaction 執行安全,可以放心確認 database 不會被 undone
rollback(or abort): 表示 transaction 執行不成功,要將之前被 transation 改變的 effects undone
Recovery techniques 用下列 operators:
[start_transation, T]: transaction 開始標記
[Write_item, T, X, old_value, new_value]: 更改 log
[read_item, T, X]: 讀取 log
[commit, T]: transaction 執行成功 log
[abort, T]: transaction 失敗 log
Recoverable schedule:
Cascadeless schedule:
Schedules requiromg cascaded rollback:
Strict Schedules:
Serial schedule:
Serializable schedule:
衝突:
Conflict equivalent:
Conflict serializable:
SQL 有一個 SET TRANSACTION statement in SQL2
Potential problems with lower isolation levels:
Dirty Read:
Nonrepeatable Read:
Phantoms:
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing