当前位置:网站首页>数据库MySQL语句期末复习 CTGU
数据库MySQL语句期末复习 CTGU
2022-06-28 17:29:00 【CTGU_narcissistic_zh】
数据库MySQL语句期末复习 CTGU
TRANSACTION事务
USE mydb;#使用数据库
DROP PROCEDURE IF EXITS mydb.proc_insert;#保证存储过程可写入(唯一)
DELIMITER $$ #使用$$ //等符号皆可 对整个小段语句做一个简单的封装 定界符(改变输入结束符为$$ 双美元符号)
START TRANSCTION;#开启事务
INSERT INTO t_emp VALUES(1,'Nancy',301,2300);
##插入语句
commit;#事务提交
END ##
DELIMITER;#告诉mysql解释器,该段命令是否已经结束了,mysql是否可以执行了
MYISAM
MyISAM是MySQL的默认数据库引擎(5.5版之前),由早期的ISAM所改良。虽然性能极佳,但却有一个缺点:不支持事务处理(transaction)。不过,在这几年的发展下,MySQL也导入了InnoDB(另一种数据库引擎),以强化参照完整性与并发违规处理机制,后来就逐渐取代MyISAM。
ISAM索引循序存取法(Index Sequential Access Mode)
InnoDB
InnoDB,是MySQL的数据库引擎之一,现为MySQL的默认存储引擎,为MySQL AB发布binary的标准之一。InnoDB由Innobase Oy公司所开发,2006年五月时由甲骨文公司并购。与传统的ISAM与MyISAM相比,InnoDB的最大特色就是支持了ACID兼容的事务(Transaction)功能,类似于PostgreSQL。
PostGreSQL
PostgreSQL是一种特性非常齐全的自由软件的对象-关系型数据库管理系统(ORDBMS),是以加州大学计算机系开发的POSTGRES,4.2版本为基础的对象关系型数据库管理系统。POSTGRES的许多领先概念只是在比较迟的时候才出现在商业网站数据库中。PostgreSQL支持大部分的SQL标准并且提供了很多其他现代特性,如复杂查询、外键、触发器、视图、事务完整性、多版本并发控制等。同样,PostgreSQL也可以用许多方法扩展,例如通过增加新的数据类型、函数、操作符、聚集函数、索引方法、过程语言等。另外,因为许可证的灵活,任何人都可以以任何目的免费使用、修改和分发PostgreSQL。
并发控制CONCURRENCY CONTROL
2.1表锁 TABLE LOCK
LOCK TABLE student math=100 READ

2.2 事务隔离级别TRANSACTION ISOLATION LEVEL
脏读
不可重复读
幻读
幻读 是在同样的条件下,你读取过的未存在的数据,当你插入时,发现数据又存在了,它的重点在于insert。 不可重复读 是在同样的条件下,你读取过的数据,再次读取出来发现值不一样了,重点在于update和delete。
| 隔离级别| 脏读 |不可重复读|幻读|
|–|–|–|
| | | |
未提交读(Read uncommitted) 可能 可能 可能
已提交读(Read committed) 不可能 可能 可能
可重复度(Repeatable read) 不可能 不可能 可能
可串行化(Serializable) 不可能 不可能 不可能
边栏推荐
- WPF video hard decoding, rendering and playing (no airspace) (support 4K, 8K and high frame rate video)
- Large scale sports events and crime risks
- CSDN博客专家
- 6 - Dictionary
- Rsync remote synchronization (sunset is especially gentle, and the world is romantic)
- MySQL高可用之MHA(一不小心和我的青春擦肩而过)
- It's said that software testing for career change can only be self-taught. Is the training institution a pit?
- 2022年6月27日-2022年7月3日(ue4视频教程)
- Redis6笔记04 主从复制,集群,应用问题,Redis6新功能
- [algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“
猜你喜欢

kubernetes可视化界面dashboard

Matlb| visual learning (plot and bar)
![[algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“](/img/ab/69c79690bf42c58c39b2e85fb3690c.png)
[algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“

rsync 远程同步(日落尤其温柔的人间皆是浪漫)

Time effective simulation platform based on dataworks | acquisition technology

听说转行软件测试只能自学,培训机构是个坑?

nuc980心跳灯

此虚拟机的处理器所支持的功能不同于保存虚拟机状态的虚拟机的处理器所支持的功能

MySQL十种锁,一篇文章带你全解析

单片机修改网络硬件驱动(phy芯片更换)
随机推荐
2022危险化学品经营单位主要负责人复训题库及在线模拟考试
How to configure the Oracle CDC service name without Sid?
Fs2k face sketch attribute recognition
CSDN Blogger
MySQL中的日志管理 日志备份与恢复
ZABBIX monitoring of traditional operation and maintenance (you get up early, I get up early, and we will get together sooner or later)
DMS的SQL结果集导出支持传参数吗?
What is the reason why easycvr can't watch the device video when it is connected to the home protocol?
How to do a good job of gateway high availability protection in the big promotion scenario
Sum of factor numbers of interval product
Google推出Advanced API Security 保护API免受安全威胁
2022年化工自动化控制仪表考试模拟100题模拟考试平台操作
2022危险化学品生产单位安全生产管理人员复习题及答案
Logback log output format
Exploration and practice of reinforcement learning in yellow page merchants' intelligent chat assistant
The processor of this virtual machine supports different functions than the processor of the virtual machine that holds the state of the virtual machine
Free, powerful and high-value note taking software evaluation: OneNote, heptabase, hydrogen graph, flowus
阿里云服务器里装的mysql是8版本的,是因为dataworks的mysql驱动版本不支持吗?现在提
Problems encountered in local deployment conflict: MySQL database code, isolation level and verification code are not displayed
Redis persistence (les adolescents naviguent toujours rapidement, obstruent et ne tournent jamais)