关于JDBC
脑补一下JDBC基础知识,原文链接:http://docs.oracle.com/javase/tutorial/jdbc/basics/gettingstarted.html
If you are using Java DB, it already comes with a JDBC driver. If you are using MySQL, install the latest version of Connector/J. Contact the vendor of your database to obtain a JDBC driver for your DBMS. There are many possible implementations of JDBC drivers. These implementations are categorized as follows: Type : Drivers that implement the JDBC API as a mapping to another data access API, such as ODBC (Open Database Connectivity). Drivers of this type are generally dependent on a native library, which limits their portability. The JDBC-ODBC Bridge is an example of a Type driver. Note: The JDBC-ODBC Bridge should be considered a transitional solution. It is not supported by Oracle. Consider using this only if your DBMS does not offer a Java-only JDBC driver. Type : Drivers that are written partly in the Java programming language and partly in native code. These drivers use a native client library specific to the data source to which they connect. Again, because of the native code, their portability is limited. Oracle's OCI (Oracle Call Interface) client-side driver is an example of a Type 2 driver. Type : Drivers that use a pure Java client and communicate with a middleware server using a database-independent protocol. The middleware server then communicates the client's requests to the data source. Type : Drivers that are pure Java and implement the network protocol for a specific data source. The client connects directly to the data source. Check which driver types comes with your DBMS. Java DB comes with two Type 4 drivers, an Embedded driver and a Network Client Driver. MySQL Connector/J is a Type 4 driver. Installing a JDBC driver generally consists of copying the driver to your computer, then adding the location of it to your class path. In addition, many JDBC drivers other than Type drivers require you to install a client-side API. No other special configuration is usually needed.
PS:天天群里吵吵什么JDBC多少种类型,这里给脑补一下,谁看到就好好看看那。另外原文中有标红的部分请注意一下。
关于JDBC的更多相关文章
- Java数据库连接技术——JDBC
大家好,今天我们学习了Java如何连接数据库.之前学过.net语言的数据库操作,感觉就是一通百通,大同小异. JDBC是Java数据库连接技术的简称,提供连接各种常用数据库的能力. JDBC API ...
- 玩转spring boot——结合AngularJs和JDBC
参考官方例子:http://spring.io/guides/gs/relational-data-access/ 一.项目准备 在建立mysql数据库后新建表“t_order” ; -- ----- ...
- [原创]java使用JDBC向MySQL数据库批次插入10W条数据测试效率
使用JDBC连接MySQL数据库进行数据插入的时候,特别是大批量数据连续插入(100000),如何提高效率呢?在JDBC编程接口中Statement 有两个方法特别值得注意:通过使用addBatch( ...
- JDBC MySQL 多表关联查询查询
public static void main(String[] args) throws Exception{ Class.forName("com.mysql.jdbc.Driver&q ...
- JDBC增加删除修改
一.配置程序--让我们程序能找到数据库的驱动jar包 1.把.jar文件复制到项目中去,整合的时候方便. 2.在eclipse项目右击"构建路径"--"配置构建路径&qu ...
- JDBC简介
jdbc连接数据库的四个对象 DriverManager 驱动类 DriverManager.registerDriver(new com.mysql.jdbc.Driver());不建议使用 ...
- JDBC Tutorials: Commit or Rollback transaction in finally block
http://skeletoncoder.blogspot.com/2006/10/jdbc-tutorials-commit-or-rollback.html JDBC Tutorials: Com ...
- FineReport如何用JDBC连接阿里云ADS数据库
在使用FineReport连接阿里云的ADS(AnalyticDB)数据库,很多时候在测试连接时就失败了.此时,该如何连接ADS数据库呢? 我们只需要手动将连接ads数据库需要使用到的jar放置到%F ...
- JDBC基础
今天看了看JDBC(Java DataBase Connectivity)总结一下 关于JDBC 加载JDBC驱动 建立数据库连接 创建一个Statement或者PreparedStatement 获 ...
- Spring学习记录(十四)---JDBC基本操作
先看一些定义: 在Spring JDBC模块中,所有的类可以被分到四个单独的包:1.core即核心包,它包含了JDBC的核心功能.此包内有很多重要的类,包括:JdbcTemplate类.SimpleJ ...
随机推荐
- Fiddler中session的请求/响应类型与图标对照表
- domion Designer 管理员ID过期
上班没几天,刚接触lotus domion 有一个服务器上打开相应的数据库提示 你的证书已经过期,网上找到的解决方案: ---------------------------------------- ...
- 详解C#委托,事件与回调函数
.Net编程中最经常用的元素,事件必然是其中之一.无论在ASP.NET还是WINFrom开发中,窗体加载(Load),绘制(Paint),初始化(Init)等等.“protected void Pag ...
- jquery 跳转到当前页面指定位置
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- SQLserver批量删除空表
今天需要清理一个很大的数据库,里面表有一堆,而且有很多是空表.想着把数据库弄小点,于是想到一次性删掉所有空表. 废话不多说,上代码. 首先,查处所有的空表. select distinct a.nam ...
- poj2074Line of Sight(直线相交)
链接 几何细节题. 对于每一个障碍物可以求出它在地产线上的覆盖区间,如下图. 紫色部分即为每个障碍物所覆盖掉的区间,求出所有的,扫描一遍即可. 几个需要注意的地方:直线可能与地产线没有交点,可视区间可 ...
- Android中view动画
[1]透明 //点击按钮 实现iv 透明的效果 动画 public void click1(View v) { //1.0意味着着完全不透明 0.0意味着完全透明 AlphaAnimation aa ...
- ajax小技巧,防止多次点击发送多个请求
var isAjax=false;$("btn").click(function(){ if(isAjax) return; isAjax=true; setTimeout(fun ...
- velocity基础教程--1.标准使用(zhuan)
http://llying.iteye.com/blog/387253 **************************** velocity是一个非常好用的模板引擎 这里不对项目进行详细介绍,可 ...
- angularJS中ng-change的用法
<html> <head> <meta charset="utf-8"> <script src="http://apps.bd ...