当前位置:网站首页>[database] must know and be able at the end of the term ----- Chapter 11 concurrency control
[database] must know and be able at the end of the term ----- Chapter 11 concurrency control
2022-07-19 04:08:00 【Lambs can't fly】
Chapter 11 concurrency control
1、 The concept of transaction and ACID nature
Concept : Is a user-defined sequence of database operations , All or nothing of these operations , It is an indivisible work unit
ACID The nature of :
A(Atomicity): Atomicity , Either do it all or don't do it at all
C(Consistency): Uniformity , Only the results of successful transaction submission , That is, only when it is successfully completed can it be submitted , You won't submit half done
I(Isolation): Isolation, , One transaction cannot be disturbed by other transactions
D(Durability): Continuity , Once the transaction is committed , Its change is permanent
2、 Data inconsistency caused by concurrent operations
1) Lost data
2) read “ dirty ” data
3) It can't be read repeatedly
3、 Common blocking techniques for concurrency control
1) Exclusive lock ==>X lock ==> Write lock : Readable and modifiable
2) Shared lock ==>S lock ==> Read the lock : Readable but not modifiable
4、 The meaning of blockade 、 Basic blocking types ( Exclusive lock 、 Shared lock ) And its compatibility
meaning : Business T Before operating on an object , Send a request to the system first , Lock it
type : Exclusive lock 、 Shared lock
Compatibility :
1) added X After the lock , Transactions cannot lock them
2) added S After the lock , Transactions can only add S lock
5、 The granularity of the blockade
meaning : The size of the blocked object is called “ Blocking granularity ”
characteristic :
1) The larger the particle size , That is, the larger a single object , Then the smaller the data unit that can be blocked , The number of concurrency decreases , Less overhead
2) The smaller the particle size , That is, the smaller a single object , Then the more data units that can be blocked , The number of concurrent increases , Spending more
6、 Know the cause and prevention of deadlock
reason : Two or more transactions send requests to block mutually blocked resources at the same time , Form a dead wait
Ways to prevent deadlocks :
1) One time blockade : It is to lock all the data to be used at one time , Otherwise, do not execute
2) Sequential blockade : Specify a blocking order for data objects , Everything is blocked in this order
边栏推荐
- How to use Google Earth client and KML Download
- Tutorial: Adaptive Replication and Partitioning in Data Systems
- Tutorial: Adaptive Replication and Partitioning in Data Systems
- Buddy: initialize memory domain
- 大文件上传
- 论文精读系列文章
- 7.16 simulation summary
- Micro, m3o micro service series (III)
- 【数据库】期末必知必会-----第八章 数据库安全
- Welcome to Hensen_ Blog directory of (full site navigation)
猜你喜欢

Understand │ what is cross domain? How to solve cross domain problems?

Find the central subscript of the array

软件测试-进阶篇

How to do clear scanning: try scanning tailor scantailor advanced | including the usage of scantailor

C语言详解系列——循环语句的练习与巩固,二分查找的讲解

Redis data migration: Method 2 AOF

EAS(能量感知调度)绿色节能调度器

IDEA配置SFTP,SSH非常方便的部署以及定位错误日志

小程序毕设作品之微信电子书阅读小程序毕业设计(5)任务书

Chapter 4 performance platform godeye source code analysis - monitoring module
随机推荐
Matlab drawing activation function sigmoid, relu
Skillfully use enterprise network disk to collect reports or summaries
How to filter viruses / spam more effectively!
英特尔助力开立医疗推动超声产检智能化
【数据库】期末必知必会-----第二章 关系数据模型
大文件上传
Raspberry pie configuration
Styleflow concise reading: use continuous flow to complete attribute editing
[database] must know at the end of the term ----- Chapter 6 experiment
【数据库】期末必知必会-----第八章 数据库安全
PAC十年:见证HPC从CPU时代走向XPU纪元
Kubernetes learning persistent storage storageclass (4)
2022 Yangtze River Delta mathematical modeling: Gearbox Fault Diagnosis
【数据库】期末必知必会-----第七章 数据库完整性
Dapr series (I)
GNN series GCN brief derivation and understanding and DGL source code analysis
Wechat online education video on demand learning applet graduation project (4) opening report
Sword finger offer 60 Points of N dice
Workload-Aware Performance Tuning for Autonomous DBMSs
How does the enterprise post office set up SPF records?