1. gzyueqian
      18529173453
      首頁 > 新聞中心 > > 正文

      Java數(shù)據(jù)庫連接驅(qū)動程序類型

      更新時間: 2007-06-06 14:13:40來源: 粵嵌教育瀏覽量:736

        一、示例分析

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

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

        2〉在Java中如何加載驅(qū)動程序,如何建立數(shù)據(jù)庫連接,如何執(zhí)行SQL語句,如何處理峁???

        二、基礎概念

        1、JDBC框架

        JDBC(Java DataBase Connectivity)是Java與數(shù)據(jù)庫的接口規(guī)范,由Java 語言編寫的類和接口組成,大致分為兩類:針對Java程序員的JDBC API和針對數(shù)據(jù)庫開發(fā)商的低層的JDBC driver API。而JDBC驅(qū)動程序由實施了這些接口的類組成。如下,JDBC的總體結構有四個組件:應用程序、驅(qū)動程序管理器、驅(qū)動程序和數(shù)據(jù)源。

        2、驅(qū)動程序類型

        JDBC驅(qū)動器根據(jù)其實現(xiàn)方式分為4種類型

        1、JDBC-ODBC bridge plus ODBC driver:        JDBC-ODBC橋驅(qū)動程序,將JDBC調(diào)用轉換為ODBC的調(diào)用。( 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調(diào)用轉換為對數(shù)據(jù)庫客戶端API的調(diào)用。(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調(diào)用轉換為DBMS-independent網(wǎng)絡協(xié)議,然后由服務器端的中間件轉換為具體數(shù)據(jù)庫服務器可以接收的網(wǎng)絡協(xié)議。(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調(diào)用直接轉換為具體數(shù)據(jù)庫服務器可以接收的網(wǎng)絡協(xié)議。(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.)

      免費預約試聽課

      亚洲另类欧美综合久久图片区_亚洲中文字幕日产无码2020_欧美日本一区二区三区桃色视频_亚洲AⅤ天堂一区二区三区

      
      

      1. 中文字幕日韩精品欧美一区久久 | 久久精品国产首页国产 | 在线中文字幕精品第二十 | 亚洲日本欧美在线不卡黑配白 | 视频偷拍一区二区三区 | 亚洲国产欧美日韩成人综合 |