点击这里给我发消息 点击这里给我发消息

Java 数据库连接驱动程序类型

添加时间:2013-12-7
    相关阅读: 开发 数据库 网络 程序 SQL Oracle 框架


CreateTable,Insert,Update,Delete,Select,DropTable:

1〉java.sql中主要的类和接口:DriverManager,Connection,Statement,ResultSet;

2〉在Java中如何加载驱动程序,如何建立数据库连接,如何执行SQL语句,如何处理峁?



1、JDBC框架

JDBC(Java DataBase Connectivity)是Java与数据库的接口规范,由Java 语言编写的类和接口组成,大致分为两类:针对Java

程序员的JDBC API和针对数据库开发商的低层的JDBC driver API。而JDBC驱动程序由实施了这些接口的类组成。如下,

JDBC的总体结构有四个组件:应用程序、驱动程序管理器、驱动程序和数据源。


2、驱动程序类型

JDBC驱动器根据其实现方式分为4种类型


1、JDBC-ODBC bridge plus ODBC driver:        JDBC-ODBC桥驱动程序,将JDBC调用转换为ODBC的调用。( This combination provides JDBC access via ODBC drivers. ODBC binary code--and in many cases, database client code-- must be loaded on each client machine that uses a JDBC-ODBC Bridge. Sun provides a JDBC-ODBC Bridge driver, which is appropriate for experimental use and for situations in which no other driver is available.)

2、Native-API partly-Java driver:  将JDBC调用转换为对数据库客户端API的调用。(A native-API partly Java technology-enabled driver: This type of driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine.)


3、 Pure Java Driver for Database Middleware: 先将JDBC调用转换为DBMS-independent网络协议,然后由服务器端的中间件转换为具体数据库服务器可以接收的网络协议。(net-protocol fully Java technology-enabled driver #This style of driver translates JDBC calls into the middleware vendor's protocol, which is then translated to a DBMS protocol by a middleware server. The middleware provides connectivity to many different databases.)

4、Direct-to-Database Pure Java Driver:    将JDBC调用直接转换为具体数据库服务器可以接收的网络协议。(native-protocol fully Java technology-enabled driver #This style of driver converts JDBC calls into the network protocol used directly by DBMSs, allowing a direct call from the client machine to the DBMS server and providing a practical solution for intranet access.)
咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册