Preventable Phenomena and Transaction Isolation Levels (309)

本文介绍了SQL标准定义的四种事务隔离级别,详细解释了脏读、不可重复读及幻象读等现象,并概述了Oracle数据库支持的事务隔离级别。

The ANSI/ISO SQL standard (SQL92) defines four levels of transaction isolation with
differing degrees of impact on transaction processing throughput. These isolation
levels are defined in terms of three phenomena that must be prevented between
concurrently executing transactions.

The three preventable phenomena are:
■ Dirty reads: A transaction reads data that has been written by another transaction
that has not been committed yet.
■ Nonrepeatable (fuzzy) reads: A transaction rereads data it has previously read and
finds that another committed transaction has modified or deleted the data.
■ Phantom reads (or phantoms): A transaction re-runs 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.

Oracle offers the read committed and serializable isolation levels, as well as a
read-only mode that is not part of SQL92. Read committed is the default.

需预防的现象和事务隔离级别
1. 在并发执行的事务中要阻止这三种现象 :
a. 脏读取 : 一个事务读取了被其他事务写入但还未提交的数据
b. 不可重复读取 : 一个事务再次读取其之前曾经读取过的数据时,发现数据已被其他已提交的事务修改或删除
c. 幻象读取 : 事务按照之前的条件重新查询时,返回的结果集中包含其他已提交事务插入的满足条件的新数据
2. Oracle 支持三种事务隔离级别:已提交读取,串行化,以及 SQL92 中没有包含的只读模式.
已提交读取是 Oracle 默认使用的事务隔离级别

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-988272/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10599713/viewspace-988272/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值