一、示例分析
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.)
Java數(shù)據(jù)庫連接驅(qū)動程序類型
更新時間: 2007-06-06 14:13:40來源: 粵嵌教育瀏覽量:736
推薦閱讀
- ·Linux字符設備驅(qū)動框架解析:file_operations的核心作用與實現(xiàn)
- ·廣東朝歌數(shù)碼科技股份有限公司專場招聘會
- ·深化產(chǎn)教融合,共筑技能人才培養(yǎng)新生態(tài) —— 廣州華立學院到訪粵嵌從化校區(qū)為深化產(chǎn)教
- ·校企合作新突破 | 粵嵌科技與三亞學院共探產(chǎn)教融合新路徑
- ·粵嵌科技入選國家級職業(yè)數(shù)字展館聯(lián)合建設單位,賦能計算機程序設計員高技能人才培養(yǎng)
- ·嵌入式實時操作系統(tǒng)的性能優(yōu)化與實現(xiàn)路徑
- ·校企攜手賦能教育!粵嵌科技助力海南科技職業(yè)大學探索 AGI 時代教學新范式
- ·嵌入式系統(tǒng)中的低功耗設計策略與實現(xiàn)路徑
- ·深圳市軒宇軟件開發(fā)有限公司專場招聘會
- ·嵌入式系統(tǒng)中的代碼空間優(yōu)化:策略與實踐