Академический Документы
Профессиональный Документы
Культура Документы
Driver Name Vendor Software JDBC ODBC driver Sun & Intersolv For ODBC: Microsft front/back office product supplies ODBC drivers for few DBs like ACCESS, Oracle, SQL Server, Excel, Visual Faxpro etc and for DBs like MySQL, Pointbase, Interbase, Sybase, Ingres and DB2 the ODBC driver software will be supplied by the DB vendors only For JDBC: JDK 1.1 & above (JDK 1.1.1 - 1.1.8, J2SDK 1.2.0 - J2SDK 1.5.0) C:\WINNT;C:\WINNT\System32;D:\J2SDK1.4.2_03\bin (Note: WINNT\System32 directory contains ODBC32.dll file) d:\j2sdk1.4.2_04\jre\lib\rt.jar sun.jdbc.odbc:JdbcOdbcDriver jdbc:odbc:mysqlDSN / jdbc:odbc:oracleDSN
Architecture
JDBC APPL JDBC-ODBC ODBC DRIVERS
ORACLE
MYSQL
Number of layers and APIs: 4 Layers (JDBC App-> JDBCODBC Driver -> ODBC Driver-> DB)'
JAVA Requests Native Requests
DBZ
Cons: Doesn't work on non-Windows OS Compared with type II driver performance is little bit slow, but negligible Restricted to connect to only local or local N/W DB Number of layers and APIs: 3 APIs (JDBC API, ODBC API, SPI - Service Provider Interface) Partly Java & Partly native on client - Pure native API on server (Client/server won't come into picture because this driver is mostly used in standalone applications) No of Layers & API used
Type II driver
Driver Name Vendor Software Java-Native API driver Database (Ex: Oracle) Database (Ex: Oracle) Oracle Server installation on Server system Oracle client installation on Client system d:\Oracle\Ora81\bin d:\Oracle\Ora81\jdbc\lib\classes111.zip oracle.jdbc.driver.OracleDriver jdbc:oracle:oci8:@tnsname
Architecture
JDBC API
Request to Socket
Pros:
JAVA Requests
Faster than all remaining 3 JDBC drivers Native Native N/W Portable to all OS Requests Requests
Native Request
Cons: Maintanance is costlier because fault finding is difficult to dealing with native libraries Suitable to all types of Java applications (Standalone, Web, Distributed, Enterprise and Integration) except Applets Recommended not to connect to remote DBs (reasons explained in the session)
Number of layers and APIs:
5 Layers (JDBC App-> Oracle Driver -> SQL * Net libraries (aka Oracle Client system native libraries/Socket program running on client system)-> TNSListener (ServerSocket running for Oracle on port number 1521) using oracle CLI-> DB) 4 APIs (JDBC API, CLI Client libraries, Socket API, CLI Server libraries) Partly Java & Partly native on client - Pure native API on server
Architecture
Pros: This option is suitable when Type II & Type IV are not present Suitable to connect to WWW system databases also More suitable to Applets when they are connecting the DB because no native libraries need to be installed on client system
Cons: Relying on third party driver vendor This driver execution is slow when compared with Type I & II
Type IV driver
Driver Name Vendor Software Java Native protocol driver DB (Oracle/MySQL) DB (Oracle/MySQL) Server software installation on server No client software installation is required on client system except required java libraries (classes111.zip)
Architecture
Pros: Light weight driver, so that no DB native libraries need to be installed on client system Comes with DB installation
Cons: Slower in execution compared with Type II and Type I but faster than III Number of layers and APIs: 4 Layers (JDBC App, Oracle Driver (uses client socket API of java), TNSListener (Server socket program written in C language), DB) 3 APIs (JDBC API, Socket API, Oracle CLI) Purely Java on client - Pure native API on server