隔离级别与脏读幻读

1. 数据库操作 issue

1.1 更新丢失(lost update):当系统允许两个事务同时更新同一数据时,发生更新丢失

1.2 脏读(dirty read):当一个事务读取另一个事务尚未提交的修改时,产生脏读。

1.3 非重复读(nonrepeatable read):同一查询在同一事务中多次进行,由于其他提交事务所做的修改或删除,每次返回不同的结果集,此时发生非重复读。(A transaction rereads data it has previously read and finds that another committed transaction has modified or deleted the data. )

1.4 幻像(phantom read):同一查询在同一事务中多次进行,由于其他提交事务所做的插入操作,每次返回不同的结果集,此时发生幻像读。(A transaction reexecutes a query returning a set of rows that satisfies a search condition and finds that another committed transaction has inserted additional rows that satisfy the condition. )

 

2. ANSI/ISO SQL92标准定义的隔离级别:

2.1 未提交读(read uncommitted

2.2 提交读(read committed)

      这是大多是数据库的默认隔离级别并被大多vendors支持

2.3 重复读(repeatable read) --行级锁定,不能写该行

2.4 序列化(serializable)   --表锁定,不能插入新的数据

 

 

 

 

 

参考: http://kakaluyi.iteye.com/blog/185473

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值