Hibernate逍遥游记-第15章处理并发问题-001事务并发问题及隔离机制介绍

1.

2.第一类丢失更新

3.脏读

4.虚读、幻读

5.不可重复读

6.第二类丢失更新

7.数据库的锁机制

8.数据库事务的隔离机制

时间: 2024-10-25 07:04:40

Hibernate逍遥游记-第15章处理并发问题-001事务并发问题及隔离机制介绍的相关文章

Hibernate逍遥游记-第15章处理并发问题-003乐观锁

1. 2. 1 drop database if exists SAMPLEDB; 2 create database SAMPLEDB; 3 use SAMPLEDB; 4 5 drop table if exists MONKEYS ; 6 create table MONKEYS( 7 ID bigint not null, 8 NAME varchar(15), 9 COUNT int, 10 VERSION integer, 11 primary key (ID) 12 ) type=

Hibernate逍遥游记-第4章映射对象标识符-increment、identity、hilo、native、assigned、sequence、<meta>

1. 1 package mypack; 2 3 import java.lang.reflect.Constructor; 4 import org.hibernate.*; 5 import org.hibernate.cfg.Configuration; 6 import java.io.*; 7 import java.sql.Time; 8 import java.util.*; 9 10 public class BusinessService{ 11 public static S

Hibernate逍遥游记-第12章 映射值类型集合-002映射Bag(<idbag><collection-id>)

1. 2. 1 <?xml version="1.0"?> 2 <!DOCTYPE hibernate-mapping 3 PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 4 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 5 <hibernate-mapping > 6 7 &l

Hibernate逍遥游记-第12章 映射值类型集合-003映射List(&lt;list-index&gt;)

1. 1 <?xml version="1.0"?> 2 <!DOCTYPE hibernate-mapping 3 PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 4 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 5 <hibernate-mapping > 6 7 <c

Hibernate逍遥游记-第12章 映射值类型集合-001映射set(&lt;element&gt;)

1. 2. 1 <?xml version="1.0"?> 2 <!DOCTYPE hibernate-mapping 3 PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 4 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 5 <hibernate-mapping > 6 7 &l

Hibernate逍遥游记-第2章-使用hibernate.properties

1. 1 package mypack; 2 3 import org.hibernate.*; 4 import org.hibernate.cfg.Configuration; 5 import java.util.*; 6 7 public class BusinessService{ 8 public static SessionFactory sessionFactory; 9 10 /** 初始化Hibernate,创建SessionFactory实例 */ 11 static{ 1

Hibernate逍遥游记-第5章映射一对多-02双向inverse

1. 1 <?xml version="1.0"?> 2 <!DOCTYPE hibernate-mapping 3 PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 4 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 5 <hibernate-mapping > 6 7 <c

Hibernate逍遥游记-第5章映射一对多-01单向cascade、lazy

1. 1 <?xml version="1.0"?> 2 <!DOCTYPE hibernate-mapping 3 PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 4 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 5 <hibernate-mapping > 6 7 <c

Hibernate逍遥游记-第10章 映射继承关系-002继承关系树中的根类对应一个表(discriminator、subclass)

1. 2. 1 <?xml version="1.0"?> 2 <!DOCTYPE hibernate-mapping 3 PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 4 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 5 <hibernate-mapping > 6 7 &l