当前位置:网站首页>Transaction characteristics and isolation levels
Transaction characteristics and isolation levels
2022-06-13 01:20:00 【Torlesse】
Transaction characteristics and isolation levels
Transaction features
Atomicity 、 Uniformity 、 persistence 、 Isolation,
- Atomicity (Atomicity) Atomicity means that a transaction is an indivisible unit of work , Either the operations in the transaction occur , Or none at all .
- Uniformity (Consistency) The integrity of the data before and after the transaction must be consistent .
- persistence (Durability) Persistence means that once a transaction is committed , It changes the data in the database permanently , Next, even if the database fails, it should not have any impact .
- Isolation, (Isolation) Transaction isolation refers to when multiple users operate the database concurrently , The transaction of one user cannot be interfered by the transactions of other users , Data between multiple concurrent transactions should be isolated from each other . Simply speaking : Transactions do not interfere with each other
Transaction concurrency
1、 Dirty reading : Business A Read transaction B Updated data , then B Rollback operation , that A The data read is dirty
2、 It can't be read repeatedly : Business A Read the same data multiple times , Business B In the transaction A During multiple reads , The data has been updated and submitted , Cause transaction A When reading the same data multiple times , result atypism .
3、 Fantasy reading : System administrator A Change the scores of all students in the database from specific scores to ABCDE Grade , But the system administrator B At this time, a specific score record was inserted , When the system administrator A After the change, I found that there is another record that hasn't been changed , It's like an illusion , This is called Unreal reading .
Isolation level
| Level | name | Isolation level | Dirty reading | It can't be read repeatedly | Fantasy reading | Database default isolation level |
|---|---|---|---|---|---|---|
| 1 | Read uncommitted | read uncommitted | yes | yes | yes | |
| 2 | Read submitted | read committed | no | yes | yes | Oracle |
| 3 | Repeatable | repeatable read | no | no | yes | MySQL |
| 4 | Serialization | serializable | no | no | no |
边栏推荐
- Leetcode question brushing 06 bit operation
- Wikipedia User Guide
- Leetcode question brushing 04 string
- [projet cs144 de Stanford Computing Network] lab1: Stream reassembler
- Pysmb usage
- Characteristics of transactions -- atomicity (implementation principle)
- Go JWT learning summary
- Unity calls alertdialog
- 軟件測試的幾種分類,一看就明了
- Leetcode-9-palindromes (simple)
猜你喜欢

The tle4253gs is a monolithic integrated low dropout tracking regulator in a small pg-dso-8 package.

How to print infinite symbol in WPS

RSA encryption colloquial explanation

Introduction to common activation functions

Alexnet实现Caltech101数据集图像分类(pytorch实现)

Most elements leetcode

Idea installation tutorial

Leetcode 05 tree

Several categories of software testing are clear at a glance

Jenkins continuous integration operation
随机推荐
[projet cs144 de Stanford Computing Network] lab1: Stream reassembler
切线与切平面
September 3, 2021 visual notes
leetode. 242. valid Letter heteronyms
Characteristics of transactions - persistence (implementation principle)
spiral matrix visit Search a 2D Matrix
Plusieurs catégories de tests logiciels sont claires à première vue
A summary of global variables and typedef
Docker install MySQL
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of BBI, MTM, obv, CCI and priceosc indicators
spiral matrix visit Search a 2D Matrix
Alexnet实现Caltech101数据集图像分类(pytorch实现)
Pipeline流水线项目构建
Common skills of quantitative investment -- Drawing Part 1: Drawing stock closing price curve and ochl candle chart
Stmarl: a spatio temporal multi agentreinforcement learning approach for cooperative traffic
Leetcode 01 array
How to turn on the hotspot for the mobile phone after the computer is connected to the network cable
[leetcode] valid phone number Bash
刘徽与《九章算术》《海岛算经》简介
3623. Merge two ordered arrays