Download (PPT, 298KB)


store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

JDBC

ODBC – ODBC-to-JDBC (or simply ODBC-JDBC) bridges

An ODBC-JDBC bridge consists of an ‘ODBC’ driver which uses the services of a JDBC driver#Type 1 Driver – JDBC-ODBC bridge|JDBC driver to connect to a database. This driver translates ODBC function-calls into JDBC method-calls. Programmers usually use such a bridge when they lack an ODBC driver for a particular database but have access to a JDBC driver.

ODBC – JDBC-to-ODBC (or simply JDBC-ODBC) bridges

independent data-access vendors deliver JDBC-ODBC bridges which support current standards for both mechanisms, and which far outperform the JVM built-in.

JDBC

‘JDBC’ is a Java-based data access technology (Java Standard Edition platform) from Oracle Corporation. This technology is an Application programming interface|API for the Java (programming language)|Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database. JDBC is oriented towards relational databases. A JDBC-to-ODBC bridge enables connections to any ODBC-accessible data source in the JVM host environment.

Datasource – Sun’s DataSource Overview [http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/datasource.html]

A driver vendor will provide a class that is a basic implementation of the DataSource interface as part of its Java Database Connectivity (JDBC) 2.0 or 3.0 driver product

JDBC driver

A ‘JDBC driver’ is a software component enabling a Java (programming language)|Java application to interact with a database.[ java.sun.com/javase/technologies/database/ Java SE Technologies – Database] JDBC drivers are analogous to ODBC drivers, ADO.NET data providers, and OLE DB providers.

JDBC driver

To connect with individual databases, Java Database Connectivity|JDBC (the Java Database Connectivity Application programming interface|API) requires drivers for each database. The JDBC driver gives out the Database Connection|connection to the database and implements the Protocol (computing)|protocol for transferring the query and result between Client (computing)|client and database.

JDBC driver

JDBC technology drivers fit into one of four categories.[ www.oracle.com/technetwork/java/overview-141217.html Sun JDBC Overview]

JDBC driver – Type 1 Driver – JDBC-ODBC bridge

The JDBC type 1 driver, also known as the ‘JDBC-ODBC bridge’, is a database driver implementation that employs the ODBC driver to connect to the database. The driver converts JDBC method calls into ODBC function calls.

JDBC driver – Type 1 Driver – JDBC-ODBC bridge

Sun provides a JDBC-ODBC Bridge driver: sun.jdbc.odbc.JdbcOdbcDriver. This driver is native code and not Java, and is closed source.

JDBC driver – Type 1 Driver – JDBC-ODBC bridge

It may sometimes be the case that more than one JDBC driver is capable of connecting to a given URL. For example, when connecting to a given remote database, it might be possible to use a JDBC-ODBC bridge driver, a JDBC-to-generic-network-protocol driver, or a driver supplied by the database vendor. In such cases, the order in which the drivers are tested is significant because the DriverManager will use the first driver it finds that can successfully connect to the given URL.

JDBC driver – Type 1 Driver – JDBC-ODBC bridge

First the DriverManager tries to use each driver in the order it was registered. (The drivers listed in jdbc.drivers are always registered first.) It will skip any drivers that are untrusted code unless they have been loaded from the same source as the code that is trying to open the connection.

JDBC driver – Disadvantages

*Performance overhead since the calls have to go through the jdbc Overhead bridge to the ODBC driver, then to the native db connectivity interface (thus may be slower than other types of drivers).

JDBC driver – Type 2 Driver – Native-API Driver

The JDBC type 2 driver, also known as the ‘Native-API driver’, is a database driver implementation that uses the client-side libraries of the database. The driver converts JDBC method calls into native calls of the database API.For example: Oracle OCI driver is a Type 2 Driver

JDBC driver – Type 3 Driver – Network-Protocol Driver(MiddleWare Driver)

The JDBC type 3 driver, also known as the Pure Java Driver for Database ‘Middleware’, is a database driver implementation which makes use of a middle tier between the calling program and the database. The middle-tier (application server) converts JDBC calls directly or indirectly into the vendor-specific database protocol.

JDBC driver – Functions

*Sends JDBC API calls to a middle-tier net server that translates the calls into the DBMS-specific network protocol. The translated calls are then sent to a particular DBMS.

JDBC driver – Functions

*The JDBC Client driver written in java, communicates with a middleware-net-server using a database independent protocol, and then this net server translates this request into database commands for that database.

JDBC driver – Type 4 Driver – Database-Protocol Driver(Pure Java Driver)

The JDBC type 4 driver, also known as the Direct to Database ‘Pure Java Driver’, is a database driver implementation that converts JDBC calls directly into a vendor-specific database protocol.

JDBC driver – Type 4 Driver – Database-Protocol Driver(Pure Java Driver)

As the database protocol is vendor specific, the JDBC client requires separate drivers, usually vendor supplied, to connect to different types of databases. This type includes, for example, the widely used Oracle database|Oracle thin driver.

JDBC driver – List of JDBC Drivers

* [http://devapp.sun.com/product/jdbc/drivers List of drivers registered with Oracle]

For More Information, Visit:

store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Categories: News