JDBC参考微博https://www.cnblogs.com/surfcater/p/10224502.html

主要内容

1.JDBC相关概念

2.JDBC常用接口

driver

connection

resultset

statement

3.使用方法
  
1.注册驱动

  2.建立连接

  3.创建statement执行sql(注意sql注入)

  4.处理结果

  5.注销连接释放资源

4.事务--------即一组sql操作语句                             提交commit、回滚rollback

DDL:数据库模式定义语言,关键字:create       事务结束于此
DML:数据操纵语言,关键字:Insert、delete、update      事务开始于此
DCL:数据库控制语言 ,关键字:grant、remove               事务结束于此
DQL:数据库查询语言,关键字:select

二、MySQL数据库中操作事务命令

  1、编写测试SQL脚本,如下:

 1 /*创建账户表*/
2 create table account(
3 id int primary key auto_increment,
4 name varchar(40),
5 money float
6 );
7
8 /*插入测试数据*/
9 insert into account(name,money) values('A',1000);
10 insert into account(name,money) values('B',1000);
11 insert into account(name,money) values('C',1000);

  下面我们在MySQL数据库中模拟A——B转帐这个业务场景

2.1、开启事务(start transaction)

  使用"start transaction"开启MySQL数据库的事务,如下所示:

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbIAAADQCAIAAADtWnOuAAASaElEQVR4nO3dW5IcxRWA4VwCOzA74J0X4QBkCQSDpJnR3CQBkuaiERIIxO3BwQYcMQuwvQI/64Ww6Q3YC0CswA94AQ5H+2Hc5azKzJMns7Iu2f1/oSCqs7NOnrrkoXr6Uubo/DsDAGgcnX8/dQoAMCeURQBooSwCQAtlEQBaKIsA0EJZBIAWyiIAtIxTFhcWt338cWeoljyB9Tfm1aJ32o9QC4oMMUL5NqPsjZnb8M3HLExeFoX2occdLoLdX7Mu1fCSsB+4msZ4js6/XziaZ0PTO/Ti1G4MPetNQ3nGR8dVlt2kOML+yUhV6ByK4HYolWfq/szYb6Hl1Pz1GwX01ZRFs3r9Ip/Nmg5GnOehTKInfalxM+IkTUh3ems23Nuts88X6gOUl/O0y6k5A0PJKItGUX2iHfRPRbstHPJaof790wtlpewsBLH7RA+K202TZHQ/aNr7LCtzBgaXVxa9LdGplTrfQlLnkrK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QntFn2oUP+M4+vtmbHfUkfETL2399gErkpSl92HNje+oHOKe+N7n0oKHs1Z7qPZD8r9Fh1UmXNSnqXyT92uULaah5r+yn3l7dB/e5P2AGbq2u6Z/VA4F92zIdRZOC30J40QP5qqPrhmFaFn6CnvTpNDyUO7MUODZuQpr5IUx91kzQZ64wtDRPsLcYQ0MrbX2x4dDnN3deekWU46kzLUGBnAxrm6fRLv1M/Q1RYASrKvFgEA5nc7p1OnAABzcv3OWbwTAGyO9/bPp04BAObkxuGTqVMAgDnZuvds6hQAYE6EG6ICwCbamesNUQFgGneOZ3pDVACYxt7JN1OnAABzsn9KWQQAC1eLANDC3xYBwPZfa6AgcOp9JmsAAAAASUVORK5CYII=" alt="" />

  我们首先在数据库中模拟转账失败的场景,首先执行update语句让A用户的money减少100块钱,如下图所示:

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdIAAAGqCAIAAAAwc1LNAAAgAElEQVR4nO3de5RdVZ3g8fsvRM2gBSjYqDiD42MN2jMu1/Q4I804OCohkE5CIAnKK8hLFHwAvaadgW6Xq3u623YEOzwa7CCCBDCEpAIquRIk76q8U5VHVVIhSVUqqapbj1RVKlnOH0Uup87Ze5/fPo997q77/axarFP77vPbv73P2b9ckvsovbajd+WO3o6jw1de/60SACBvK1v6Vrb0dRwbuer6bxedCwDUgXJLpdxSOXBs5Krr7y46FwCoA9WyO+MGyi4A5K/c0ldu6TtwbGQGf8kAAA6s3Nm7cmfvgWPDlF0AcOG17cdW7jjWcWx4Bq9kAAAHfru1+3fbjnYcPX7V1+8qOhcAqAOvbO76zZau/d1DbspuOSDa7iABW8rEQlNQzsilwhMAYGH5xkMrmg/vPzJ05de+6WxQQy1zloOQLqtQe4bJJ4tTm6sHQGHpugPLNx7c1zU4/bo7nQ0qrGW1LKeymziO/ESeGgMFW7J639K1He2dA1fMv6McUe0W/X/q4HF0GwcbdY8q85FUBF0yknzk5cawDsnabYMr52g1rvkU4ToAyNgLb7QtWb2vrbN/2rzbq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ezxlhrcaYWklGBEZa3U/So/PdhO5QW8t+D+f7ztBw+V12275CuzinpKVYMSLEL0lGi5lJddXf+i/gTilgAyc9N9f/+N//X/Vq7deslXZo63yPdYsDQon6mlfPZnjmP1J4SuvyS+ZAhziRSGkvS3ykc4X0mG8qUGEOOme5OX3ZKqUpRUz9qUkeUDGU6UBJHkkzg3Q//ggkhimvuby6IumTTHupgAUlnwlz++7X8/VF637ZKvzhpvsdpgwVoQPdAdC8tQaBTlrwkqUTT5aEWzrTKx8SUxJf3zmK8kpu2CANC67QcPffOvH3l9w45LL796vMVqg8WWBuWxsAzpRrEtGZI45p4JgpcCZU4YU9I/j/kKExMOCiDGXX/z6D1/+/M3mlqqLyDLr+yWJlbeTMqHJI6uv8s8db9K+uc9X3N8qxUAEO97f/+L+3/yq9Vb9lw2Y345wnyuoafuIdtypkzJtgzF5mOeQmzw6Fm6/GPj6/ob8jSkIZ+vuV0yIgCpv/rZrx94dNm67fu/POv6onMBgDrwo0W/+7unf9+069C0a24uOhcAqAM/eWHdT5c0bWnrvnL+rUXnAgB14LFXW/7lt7u3d/TNvP6bRecCAHXgqTcOPP2Hgy2HBmffdHfRuQBAHVi84djzG/kuNQBwZcmWwSVbB/nmYABwZNnO0WU7R9uOnZx3231F5wIAdWB569jy1rH2nlPzbr+/6FwAYPL7//qpxbj3mzovAAAAAElFTkSuQmCC" alt="" />

  然后我们关闭当前操作的dos命令行窗口,这样就导致了刚才执行的update语句的数据库的事务没有被提交,那么我们对A用户的修改就不算是是真正的修改了,下次在查询A用户的money时,依然还是之前的1000,如下图所示:

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXEAAABfCAIAAACRNGABAAAHFklEQVR4nO3da2/URhTG8X1baAuE3EMSkkACIpQW0aJKVSXUN1Wl9tNBwgILixJupRLtN9hv1r5i63guPmd8fBnn/xOqzGR25pmxfboK3mT0xaXFx0fjhcWVEQDUR00BYImaAsASNQWApTZryqzAbW8hgDBPD+WSs//O506GlqxtF2n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sOgiAQXjw6I+3H//Zu3W36yAABuHBo9/ffvybmgLAxrc//Xr64dPu/p2ugwAYgv8AEkYdSD1D8HwAAAAASUVORK5CYII=" alt="" />

2.2、提交事务(commit)

  下面我们在数据库模拟A——B转账成功的场景

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAywAAAF5CAIAAADyMDmnAAAgAElEQVR4nO3dWZAcx33n8Xq1LIskrrkwJwYDYDAACAIQCJAiwAPUSZGieEgiRVqkRMuSLcduOCyFX2Tvw0bs0/pBBDAABhhgQBzEJfDUAYPtK7RhhUSvZEuWJZISD5EgboKgxpbW2IcR2jVVmf/6Z1ZVV1f19xMdjJ7qrMx/Zg8rf+ie6QkO/+0/vfjaqQ994qEAAAAAmZqcnHzllVdef/3106dPnw05d+5ccLj2/AuvnfzgPb9fdJGAZF0QHC+6BgAAXMkh7HsvvHbyA3c/WHSRgNlU/LoUBJeKrgQAAFdSCDtS+/4Lr578wF0PFF2k2SVuVbwprQvFL6cTAQBoElIIO/o3z7/4WlOHMFSM5jmNx68mDGGu9ejbN9tMAQDepBD21D/84KVfnvpgs74dyW5UPfJzaotf9dtzQXA4CL4aBA8Ewbog6E1RRvoX7Zy+PwlhANCCpBD2zf/zo5+/cebD936m6CLN2I2qx/acJsYv4fZ8EDwXBF8Ngq8GwbogWJauHuG7Thna0rw5m/I9XABAU5FC2PHv/+zlE2dv+9TDRRdpxt5TPfHnNE38Em4vBsFzQbA9CL4aBLcHwTp1PXIIc5qa/tF6G6d6AABNTgphf/uDn7968vwd9z/SgDpqIfHjxlPYfhpGeBayZQxhz+UQwpSvJ+UXwjxeA4vf4X8BACg1KYR958ev/fL0hTsf/MOGVWPc7G0JwHUHyipGuPbTmPiSnlBngSFsSlZR7KUgqAVBLQj+Kgj+Igj+IgjWB8F6+3uUuYYw/ZfxrohfAFABUgj7x5+eeP3Mxbs+88WGVWPb7I3HnfahrGKEaz8Niy8pNaBO4yudEfJzmhjFXDNWItcQpn9xy+NluWD6Q0Qx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HsitldG0e3zWrrLLpIAACAqpFC2LtntD+6ecvMOe1FFwkAAFA1Qgj7/0Uhxlh3AP2iAAAAAElFTkSuQmCC" alt="" />

  我们手动提交(commit)数据库事务之后,A——B转账100块钱的这个业务操作算是真正成功了,A账户中少了100,B账户中多了100。

2.3、回滚事务(rollback)

  

  通过手动回滚事务,让所有的操作都失效,这样数据就会回到最初的初始状态!

三、JDBC中使用事务

  当Jdbc程序向数据库获得一个Connection对象时,默认情况下这个Connection对象会自动向数据库提交在它上面发送的SQL语句。若想关闭这种默认提交方式,让多条SQL在一个事务中执行,可使用下列的JDBC控制事务语句

  • Connection.setAutoCommit(false);//开启事务(start transaction)
  • Connection.rollback();//回滚事务(rollback)
  • Connection.commit();//提交事务(commit)

3.1、JDBC使用事务范例

  在JDBC代码中演示银行转帐案例,使如下转帐操作在同一事务中执行

  "update account set money=money-100 where name='A'"

  update account set money=money+100 where name='B'

  代码如下:

  1 package me.gacl.demo;
2
3 import java.sql.Connection;
4 import java.sql.PreparedStatement;
5 import java.sql.ResultSet;
6 import java.sql.SQLException;
7 import me.gacl.utils.JdbcUtils;
8 import org.junit.Test;
9
10 /**
11 * @ClassName: TransactionDemo1
12 * @Description:
13 * JDBC中使用事务来模似转帐
14 create table account(
15 id int primary key auto_increment,
16 name varchar(40),
17 money float
18 );
19 insert into account(name,money) values('A',1000);
20 insert into account(name,money) values('B',1000);
21 insert into account(name,money) values('C',1000);
22 * @author: 孤傲苍狼
23 * @date: 2014-9-22 下午11:16:17
24 *
25 */
26 public class TransactionDemo1 {
27
28 /**
29 * @Method: testTransaction1
30 * @Description: 模拟转账成功时的业务场景
31 * @Anthor:孤傲苍狼
32 *
33 */
34 @Test
35 public void testTransaction1(){
36 Connection conn = null;
37 PreparedStatement st = null;
38 ResultSet rs = null;
39
40 try{
41 conn = JdbcUtils.getConnection();
42 conn.setAutoCommit(false);//通知数据库开启事务(start transaction)
43 String sql1 = "update account set money=money-100 where name='A'";
44 st = conn.prepareStatement(sql1);
45 st.executeUpdate();
46 String sql2 = "update account set money=money+100 where name='B'";
47 st = conn.prepareStatement(sql2);
48 st.executeUpdate();
49 conn.commit();//上面的两条SQL执行Update语句成功之后就通知数据库提交事务(commit)
50 System.out.println("成功!!!"); //log4j
51 }catch (Exception e) {
52 e.printStackTrace();
53 }finally{
54 JdbcUtils.release(conn, st, rs);
55 }
56 }
57
58 /**
59 * @Method: testTransaction1
60 * @Description: 模拟转账过程中出现异常导致有一部分SQL执行失败后让数据库自动回滚事务
61 * @Anthor:孤傲苍狼
62 *
63 */
64 @Test
65 public void testTransaction2(){
66 Connection conn = null;
67 PreparedStatement st = null;
68 ResultSet rs = null;
69
70 try{
71 conn = JdbcUtils.getConnection();
72 conn.setAutoCommit(false);//通知数据库开启事务(start transaction)
73 String sql1 = "update account set money=money-100 where name='A'";
74 st = conn.prepareStatement(sql1);
75 st.executeUpdate();
76 //用这句代码模拟执行完SQL1之后程序出现了异常而导致后面的SQL无法正常执行,事务也无法正常提交,此时数据库会自动执行回滚操作
77 int x = 1/0;
78 String sql2 = "update account set money=money+100 where name='B'";
79 st = conn.prepareStatement(sql2);
80 st.executeUpdate();
81 conn.commit();//上面的两条SQL执行Update语句成功之后就通知数据库提交事务(commit)
82 System.out.println("成功!!!");
83 }catch (Exception e) {
84 e.printStackTrace();
85 }finally{
86 JdbcUtils.release(conn, st, rs);
87 }
88 }
89
90 /**
91 * @Method: testTransaction1
92 * @Description: 模拟转账过程中出现异常导致有一部分SQL执行失败时手动通知数据库回滚事务
93 * @Anthor:孤傲苍狼
94 *
95 */
96 @Test
97 public void testTransaction3(){
98 Connection conn = null;
99 PreparedStatement st = null;
100 ResultSet rs = null;
101
102 try{
103 conn = JdbcUtils.getConnection();
104 conn.setAutoCommit(false);//通知数据库开启事务(start transaction)
105 String sql1 = "update account set money=money-100 where name='A'";
106 st = conn.prepareStatement(sql1);
107 st.executeUpdate();
108 //用这句代码模拟执行完SQL1之后程序出现了异常而导致后面的SQL无法正常执行,事务也无法正常提交
109 int x = 1/0;
110 String sql2 = "update account set money=money+100 where name='B'";
111 st = conn.prepareStatement(sql2);
112 st.executeUpdate();
113 conn.commit();//上面的两条SQL执行Update语句成功之后就通知数据库提交事务(commit)
114 System.out.println("成功!!!");
115 }catch (Exception e) {
116 try {
117 //捕获到异常之后手动通知数据库执行回滚事务的操作
118 conn.rollback();
119 } catch (SQLException e1) {
120 e1.printStackTrace();
121 }
122 e.printStackTrace();
123 }finally{
124 JdbcUtils.release(conn, st, rs);
125 }
126 }
127 }

3.2、设置事务回滚点

  在开发中,有时候可能需要手动设置事务的回滚点,在JDBC中使用如下的语句设置事务回滚点

  Savepoint sp = conn.setSavepoint();
  Conn.rollback(sp);
  Conn.commit();//回滚后必须通知数据库提交事务
  设置事务回滚点范例

 1 package me.gacl.demo;
2
3 import java.sql.Connection;
4 import java.sql.PreparedStatement;
5 import java.sql.ResultSet;
6 import java.sql.SQLException;
7 import java.sql.Savepoint;
8
9 import me.gacl.utils.JdbcUtils;
10 import org.junit.Test;
11
12 /**
13 * @ClassName: TransactionDemo1
14 * @Description:
15 * JDBC中使用事务来模似转帐
16 create table account(
17 id int primary key auto_increment,
18 name varchar(40),
19 money float
20 );
21 insert into account(name,money) values('A',1000);
22 insert into account(name,money) values('B',1000);
23 insert into account(name,money) values('C',1000);
24 * @author: 孤傲苍狼
25 * @date: 2014-9-22 下午11:16:17
26 *
27 */
28 public class TransactionDemo2 {
29
30 /**
31 * @Method: testTransaction1
32 * @Description: 模拟转账成功时的业务场景
33 * @Anthor:孤傲苍狼
34 *
35 */
36 @Test
37 public void testTransaction1(){
38 Connection conn = null;
39 PreparedStatement st = null;
40 ResultSet rs = null;
41 Savepoint sp = null;
42
43 try{
44 conn = JdbcUtils.getConnection();
45 conn.setAutoCommit(false);//通知数据库开启事务(start transaction)
46
47 String sql1 = "update account set money=money-100 where name='A'";
48 st = conn.prepareStatement(sql1);
49 st.executeUpdate();
50
51 //设置事务回滚点
52 sp = conn.setSavepoint();
53
54 String sql2 = "update account set money=money+100 where name='B'";
55 st = conn.prepareStatement(sql2);
56 st.executeUpdate();
57
58 //程序执行到这里出现异常,后面的sql3语句执行将会中断
59 int x = 1/0;
60
61 String sql3 = "update account set money=money+100 where name='C'";
62 st = conn.prepareStatement(sql3);
63 st.executeUpdate();
64
65 conn.commit();
66
67 }catch (Exception e) {
68 try {
69 /**
70 * 我们在上面向数据库发送了3条update语句,
71 * sql3语句由于程序出现异常导致无法正常执行,数据库事务而已无法正常提交,
72 * 由于设置的事务回滚点是在sql1语句正常执行完成之后,sql2语句正常执行之前,
73 * 那么通知数据库回滚事务时,不会回滚sql1执行的update操作
74 * 只会回滚到sql2执行的update操作,也就是说,上面的三条update语句中,sql1这条语句的修改操作起作用了
75 * sql2的修改操作由于事务回滚没有起作用,sql3由于程序异常没有机会执行
76 */
77 conn.rollback(sp);//回滚到设置的事务回滚点
78 //回滚了要记得通知数据库提交事务
79 conn.commit();
80 } catch (SQLException e1) {
81 e1.printStackTrace();
82 }
83 e.printStackTrace();
84 }finally{
85 JdbcUtils.release(conn, st, rs);
86 }
87 }
88 }

(大对象啥的没听过先不看了!!)

(时间)

咸鱼入门到放弃1--JDBC的更多相关文章

  1. 咸鱼入门到放弃13--监听器(Listener)

    一.监听器介绍 1.1.监听器的概念

  2. 咸鱼入门到放弃12--Filter(过滤器)*

    一.Filter简介 Filter也称之为过滤器,它是Servlet技术中最激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有web资源:例如Jsp, Servlet, 静态 ...

  3. 咸鱼入门到放弃11--Servlet+JSP+JavaBean开发模式

    本篇搬运了大佬blog:https://www.cnblogs.com/xdp-gacl/p/3902537.html 一.Servlet+JSP+JavaBean开发模式(MVC)介绍 Servle ...

  4. 咸鱼入门到放弃10--javaweb的两种开发模式

    (本篇是之前方法的综合使用,新东西不多,其中也涉及三层架构的问题.此处直接引用了大佬blog:https://www.cnblogs.com/xdp-gacl/p/3908610.html) SUN公 ...

  5. 咸鱼入门到放弃9--jsp中使用的JavaBean

    一.什么是JavaBean JavaBean是一个遵循特定写法的Java类,它通常具有如下特点: 这个Java类必须具有一个无参的构造函数 属性必须私有化. 私有化的属性必须通过public类型的方法 ...

  6. 咸鱼入门到放弃8--jsp<三>jsp内置对象

    NO. 内置对象 类型 1 pageContext javax.servlet.jsp.PageContext 2 request javax.servlet.http.HttpServletRequ ...

  7. 咸鱼入门到放弃7--jsp<二>jsp常用标签

    一.JSP标签介绍 JSP标签也称之为Jsp Action(JSP动作)元素,它用于在Jsp页面中提供业务逻辑功能,避免在JSP页面中直接编写java代码,造成jsp页面难以维护. 二.JSP常用标签 ...

  8. 咸鱼入门到放弃6--jsp<一>三指令

    JSP全称是Java Server Pages 它和servle技术一样,都是SUN公司定义的一种用于开发动态web资源的技术.JSP这门技术的最大的特点在于,写jsp就像在写html,但它相比htm ...

  9. 咸鱼入门到放弃5--Session和Cookie

    保存会话数据的两种技术 1.Cookie Cookie是客户端技术,程序把每个用户的数据以cookie的形式写给用户各自的浏览器.当用户使用浏览器再去访问服务器中的web资源时,就会带着各自的数据去. ...

随机推荐

  1. 5分钟搞定Nginx安装

      1. 安装gcc(centos 7之后一般已自带,可以在第6步失败后再安装) yum install gcc gcc-c++   2. 安装pcre yum install -y pcre pcr ...

  2. 关于socket.io获取客户端真实IP地址

    1 前言 由于使用了CDN加速,导致了socket.handshake.address拿到值都是服务器的,而没有使用CDN加速时,可以拿到客户端真实IP. 2 代码 if(socket.handsha ...

  3. Js操作Array数组

    之前写过一篇文章,但是很模糊,不过却给我提供了一个思路,所以没有删除,这次写的是一个完善版本! 因为在很多的时候我们在选中了几行数据,然后存放在Array中,如下图: 看下控制台的数据 我双击了这两个 ...

  4. Python-Mongodb vs mysql

    mongodb https://www.cnblogs.com/kermitjam/articles/10147254.html#_label5 centos安装mongodb: https://bl ...

  5. 哎呀,搬运blog好累啊,96篇呢QwQ

    累死了,哼 哎呀,算了,不搬了不搬了

  6. Url解码和编码 escape()、encodeURI()、encodeURIComponent()区别详解

    Server.UrlDecode;解码 Server.UrlEncode;编码 url编码是一种浏览器用来打包表单输入的格式.浏览器从表单中获取所有的name和其中的值 ,将它们以name/value ...

  7. iOS -- Effective Objective-C 阅读笔记 (1)

    1: 在类的头文件中尽量 少 的引用其他头文件,尽量用 @class xxxxxx; 理解: 当你创建了一个 A 类,这个类又 需要具有 B 类的实例, 你可以直接为 A 类添加 B 类类型的 属性, ...

  8. Confluence 6 从你的 JDBC 连接中直接启用校验查询

    确定 Confluence 在数据库连接池中校验数据库连接: 停止 Confluence. 编辑 <home-directory>confluence.cfg.xml 文件. 针对你特定的 ...

  9. 调皮的HR

    如图:笔试题 # -*- coding: utf- -*- """ Created on Thu Apr :: @author: weilong "" ...

  10. 如何在PDF中添加水印,PDF添加水印技巧

    PDF文件现在的使用很是普遍,不管是工作中还是学习中都会使用到PDF文件,制作一个PDF文件就很辛苦的,我们要是想把PDF文件中添加水印防止抄袭的时候应该要怎么做呢,其实吧PDF文件添加水印还挺简单的 ...