当前位置:网站首页>Database mysql statement final review CTGU
Database mysql statement final review CTGU
2022-06-28 17:58:00 【CTGU_ narcissistic_ zh】
database MySQL Sentence final review CTGU
TRANSACTION Business
USE mydb;# Using a database
DROP PROCEDURE IF EXITS mydb.proc_insert;# Ensure that stored procedures are writable ( only )
DELIMITER $$ # Use $$ // And other symbols Make a simple encapsulation of the whole short statement delimiter ( Change the input terminator to $$ Double dollar sign )
START TRANSCTION;# Open transaction
INSERT INTO t_emp VALUES(1,'Nancy',301,2300);
## Insert statement
commit;# Transaction submission
END ##
DELIMITER;# tell mysql Interpreter , Whether the order has ended ,mysql Whether it can be carried out
MYISAM
MyISAM yes MySQL The default database engine for (5.5 Prior to version ), From the early ISAM Improved by . Although the performance is excellent , But there is one drawback : Transaction not supported (transaction). however , With the development of these years ,MySQL It also introduced InnoDB( Another database engine ), To strengthen reference integrity and concurrent violation processing mechanism , Then it gradually replaced MyISAM.
ISAM Index sequential access method (Index Sequential Access Mode)
InnoDB
InnoDB, yes MySQL One of the database engines of , Now is MySQL The default storage engine for , by MySQL AB Release binary One of the standards of .InnoDB from Innobase Oy The company developed ,2006 In May 2005, Oracle acquired . With the traditional ISAM And MyISAM comparison ,InnoDB The most important feature of the company is its support ACID Compatible transactions (Transaction) function , Be similar to PostgreSQL.
PostGreSQL
PostgreSQL It is an object of free software with very complete features - Relational database management system (ORDBMS), It was developed by the computer department at the University of California POSTGRES,4.2 Version based object relational database management system .POSTGRES Many of our leading concepts only appeared later in the commercial website database .PostgreSQL Support most of SQL Standards and many other modern features , Such as complex queries 、 Foreign keys 、 trigger 、 View 、 Transaction integrity 、 Multi version concurrent control, etc . Again ,PostgreSQL It can also be extended in many ways , For example, by adding new data types 、 function 、 The operator 、 Aggregation function 、 Index method 、 Process language, etc . in addition , Because of the flexibility of the license , Anyone can use it for free for any purpose 、 Modify and distribute PostgreSQL.
concurrency control CONCURRENCY CONTROL
2.1 Table locks TABLE LOCK
LOCK TABLE student math=100 READ

2.2 Transaction isolation level TRANSACTION ISOLATION LEVEL
Dirty reading 
It can't be read repeatedly 
Fantasy reading 
Fantasy reading Under the same conditions , The nonexistent data you have read , When you plug in , It is found that the data exists again , The point of it is insert. It can't be read repeatedly Under the same conditions , The data you read , Read it again and find that the value is different , The point is update and delete.
| Isolation level | Dirty reading | It can't be read repeatedly | Fantasy reading |
|–|–|–|
| | | |
Uncommitted read (Read uncommitted) Probably Probably Probably
Read committed (Read committed) impossible Probably Probably
Repeatable degrees (Repeatable read) impossible impossible Probably
Serializable (Serializable) impossible impossible impossible
边栏推荐
- Does the dataworks SQL script support if else judgment of statement blocks
- MCU modifies network hardware driver (PHY chip replacement)
- Solve the problem of sqoop error manager SqlManager: Generic SqlManager. listDatabases() not implemented
- How to put your WordPress website in maintenance mode
- Redis 原理 - Hash
- 工业数字化与新一代数字化系统设计平台----讲座
- 传统运维不得不会的zabbix监控(你早起,我早起,我们迟早在一起)
- Visio use
- R programming language - Introduction
- Differences between shared hosts and WordPress hosts
猜你喜欢

Visio use

IDC:阿里云获2021中国数据治理平台市场份额第一

TDengine ×英特尔 边缘洞见软件包 加速传统行业的数字化转型

数据库MySQL语句期末复习 CTGU

MySQL High available MHA (accidentellement avec ma jeunesse)

Redis principle - hash

Redis persistence (young people always set sail with a fast horse, with obstacles and long turns)

Summary and Thinking on interface test automation

Redis6笔记04 主从复制,集群,应用问题,Redis6新功能

58 Technology Salon issue 31 flutter dynamic special Salon
随机推荐
Redis persistence (young people always set sail with a fast horse, with obstacles and long turns)
居家高效远程办公 | 社区征文
Why can't China produce products like idea?
听说转行软件测试只能自学,培训机构是个坑?
rsync 远程同步(日落尤其温柔的人间皆是浪漫)
2022 recurrent training question bank and online simulation examination for main principals of hazardous chemicals business units
Why insert is configured with'select last_ INSERT_ What if id() 'returns 0?
2022年化工自动化控制仪表考试模拟100题模拟考试平台操作
Anesthesia is not as simple as "one injection". Painless, safe and comfortable anesthesia is the first choice for patients
ICML 2022 | transferable imitation learning method based on decoupling gradient optimization
How much is the data delay when you collect Oracle data? I can't keep it down for 3 seconds. Is there an industry reference
2022危险化学品经营单位主要负责人复训题库及在线模拟考试
麻醉不止“打一针”那么简单,无痛、安全、舒适为患者首选
节点基础~节点层级
6 - Dictionary
kubernetes资源对象介绍及常用命令
Redis主从复制、哨兵、cluster集群原理+实验(好好等,会晚些,但会更好)
Leetcode 6. Zigzag transformation (awesome, solved)
The MySQL installed in Alibaba cloud server is version 8. Is it because the MySQL driver version of dataworks does not support it? Now mention
Tidb v6.0.0 (DMR): initial test of cache table - tidb Book rush