`
ymanyang
  • 浏览: 4792 次
  • 性别: Icon_minigender_1
  • 来自: 成都
最近访客 更多访客>>
社区版块
存档分类
最新评论

SQL Transaction Isolation Level

阅读更多

Introduction
Transaction is a mechanism to ensure a bunch of database operations be performed in an atomic way. Either all of the operations succeed(committed) or nothing will be persisted(rollback). By default, a sql statement will begin a transaction if there is no transaction exists in the connection. And it will end manually , or some exception or error happens which can cause the transation be rolled back.


There are four types of transaction isolation level exist based on the subsequent read result in simultanious sessions. I list them in the table below:

Dirty read (Uncommitted update and insertion) Non-repeatable read(committed update and insertion) phantom read(insertion)
Uncommitted read Y Y Y
Committed read N/A Y Y
Non-repeatable N/A N/A Y
Serializable N/A N/A N/A

 

分享到:
评论

相关推荐

    MySQL数据库事务隔离级别介绍(Transaction Isolation Level)

     [mysqld] transaction-isolation = REPEATABLE-READ 这里全局默认是REPEATABLE-READ,其实MySQL本来默认也是这个级别 2.对当前session修改,在登录mysql客户端后,执行命令: 要记住mysql有一个autoc

    transaction_isolation:以与数据库无关的方式在ActiveRecord中设置事务隔离级别

    不再维护-请分叉或寻求其他解决方案...例子 ActiveRecord::Base.isolation_level( :serializable ) do # your codeend安装将此添加到您的Gemfile中: gem 'transaction_isolation'然后运行: bundle它可以与Ru

    历史上最强的sql FAQ for Oracle

    第一部分、SQL&PL/SQL [Q]怎么样查询特殊字符,如通配符%与_ ...[A]set transaction [isolation level] read committed; 默认语句级一致性 set transaction [isolation level] serializable; read only; 事务级一致性

    微软内部资料-SQL性能优化3

    locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ISOLATION LEVEL statement. To determine the transaction isolation level ...

    SQLServer中防止并发插入重复数据的方法详解

    SQLServer中防止并发插入重复数据,大致有以下几种方法: 1.使用Primary Key,Unique Key等在数据库层面让重复数据无法插入。 2.插入时使用条件 insert into Table(****) select ...set transaction isolation level SE

    Pro.SQL.Server.Internals

    The book provides a solid road map for understanding the depth and power of the SQL Server database server and teaches how to get the most from the platform and keep your databases running at the ...

    MySQL数据库:事务隔离级别.pptx

    SET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED 说明:如果指定GLOBAL,那么定义的隔离级将适用于所有的SQL用户;如果指定SESSION,则...

    ORM及代码生成器C#源码(最新版V4.5.8.5、非常适于ASP.NET MVC)

    public IDbTransaction BeginTransaction(IsolationLevel isolationLevel, double activeTime); public bool Commit(); protected static int Delete(string condition); protected static int Delete...

    ORM及代码生成器和插件C#源码(DBFrameworkV4.5.3)

    public IDbTransaction BeginTransaction(IsolationLevel isolationLevel, double activeTime); public bool Commit(); protected static int Delete(string condition); protected static int Delete...

    ORM及代码生成器C#源码(2012最新版Kenly.DBFramework4.6.5.5)

    public IDbTransaction BeginTransaction(IsolationLevel isolationLevel, double activeTime); public bool Commit(); protected static int Delete(string condition); protected static int Delete(string ...

    Sql for mysql

    3.5 Downloading SQL Statements from the Web Site . . . . . . . . . . 38 3.6 Ready? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 CHAPTER 4 SQL in a Nutshell ...

    基于MySQL的数据库中间件Meituan-DBProxy.zip

    支持set transaction isolation level 支持use db 支持set option语句 支持set session级系统变量 支持建立连接时指定连接属性 改进连接池的连接管理,增加超时释放机制...

    hibernate.properties

    ## to use the second-level cache with JTA, Hibernate must be able to obtain the JTA TransactionManager #hibernate.transaction.manager_lookup_class org.hibernate.transaction....

    mysql SELECT FOR UPDATE语句使用示例

    以MySQL 的InnoDB 为例,预设的Tansaction isolation level 为REPEATABLE READ,在SELECT 的读取锁定主要分为两种方式:SELECT … LOCK IN SHARE MODE SELECT … FOR UPDATE这两种方式在事务(Transaction) 进行当中...

    Absolute Database for D7

    user and multi-user mode Full transactions support with ReadCommited isolation level SQL Support SELECT with DISTINCT, INNER LEFT, RIGTH, FULL and OUTER JOIN, GROUP BY and ORDER BY clauses CREATE ...

    前端-后端java的Util类的工具类

    │ Level.java │ Logging.java │ LoggingMXBean.java │ LoggingPermission.java │ LogManager.java │ LogRecord.java │ LogUtil.java │ LogUtil2.java │ MemoryHandler.java │ PropertiesFactory.java │ ...

    mysql数据库的基本操作语法

    Ø 常用查询 MySQL结束符是“;”结束。 1、 显示所有数据库 show databases; 2、 删除数据库 drop database dbName; 3、 创建数据库 create database [if not exists] dbName;...中括号部分可选的,判断该数据不存在就...

    Apache Geronimo 2.1_ Quick Reference.pdf

    Transaction isolation levels 145 Transactions in web applications 146 Summary 148 Chapter 6: Security 149 Overview of security standards 149 Java Authentication and Authorization Service (JAAS) ...

    Doctrine ORM for PHP.pdf

    Table of Contents Introduction....................................................................................................13 Code Examples.........................................................

Global site tag (gtag.js) - Google Analytics