JSP Learning--Comprehensive analysis of JDBC (1)

Source: Internet
Author: User
Tags driver manager connect odbc client
JS Overview: The Java Database Connectivity architecture is a standard method for connecting a database to a Java application. JDBC is an API for Java programmers and is an interface model for implementing a service provider that is connected to a database. As the API,JDBC provides the standard interface for the program development, and provides the standard method for the database manufacturer and the third party middleware manufacturer to realize the connection with the database. JDBC uses existing SQL standards and supports standards for connecting to other databases, such as bridging between ODBC. JDBC implements all of these standard-oriented goals and has a simple, rigorous type-defined and High-performance implementation interface.


--------------------------------------------------------------------------------

How do I choose the right JDBC product?

For the latest information on JDBC, interested readers can refer to the official JDBC website, the JavaSoft homepage, at the URL: http://Java.sun.com/products/jdbc

1. JavaSoft Framework

JavaSoft offers three JDBC product components that are part of the Java Development Kit (JDK): The JDBC Driver Manager, the JDBC Driver Test Kit, and the Jdbc-odbc Bridge.

The JDBC Driver Manager is the backbone of the JDBC architecture. It's actually small and simple; Its primary role is to connect the Java application to the correct JDBC driver and then exit.

The JDBC Driver Test Kit provides a certain level of credibility for the JDBC driver to run your program. Only drivers tested through the JDBC driver are considered to be compliant with the JDBC Standard TM.

The JDBC-ODBC Bridge enables ODBC drivers to be used as JDBC drivers. Its implementation provides a way for the rapid development of JDBC, and its long-term goal provides a way to access some of the less common DBMS (if JDBC is not implemented for these uncommon DBMS).

2. Type of JDBC Driver

The more common JDBC drivers are currently grouped into the following four categories:

(1) JDBC-ODBC Bridge plus ODBC driver

JavaSoft Bridge products use ODBC drivers to provide JDBC access. Note that ODBC binaries (in many cases also including database client code) must be loaded on each client computer that uses the driver. Therefore, this type of driver is best suited to the Enterprise network (the installation of the client on this network is not a major problem) or the application server code written in Java with a three-tier structure.

(2) Local API

This type of driver converts JDBC calls on the client API to calls from Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this type of driver requires that some binaries be loaded onto each client.

(3) JDBC Network pure Java Driver

This driver converts JDBC to a DBMS-independent network protocol, which is then converted by a server into a DBMS protocol. This kind of network server middleware can connect its pure Java client to many different databases. The specific protocol used depends on the provider. Typically, this is the most flexible JDBC driver. It is possible that all providers of this solution offer products that are appropriate for intranet use. In order for these products to also support Internet access, they must handle additional requirements for the security provided by the Web, access through firewalls, and so on. Several providers are adding JDBC drivers to their existing database middleware offerings.

(4) Local protocol pure Java driver

This type of driver converts the JDBC call directly to the network protocol used by the DBMS. This will allow direct invocation of the DBMS server from the client machine, which is a useful solution for intranet access. Since many of these protocols are private, the database provider will be the main source themselves, and several providers are already working on it.

According to experts, Class (3) and (4) drivers will be the first way to access a database from JDBC. The category (1), (2) class driver is used as a transition scheme before the direct pure Java driver is listed. There may be variants for Class (1), (2) drivers that require connectors, but these are generally more undesirable solutions. The category (3), (4) class driver provides all the benefits of Java, including automatic installation (for example, by using the JDBC driver's appletapplet to download the driver).

3. Access to JDBC Drivers

There are currently dozens of (1) class drivers that can be used in conjunction with the JavaSoft Bridge for ODBC driver drivers. There are approximately 10 drivers of type (2) that are based on the DBMS's local API. There are only a few drivers that belong to the category (3), and the first providers are SCO, Openhorizon, Visigenic and WebLogic. In addition, JavaSoft and the leading provider of database Connectivity Intersolv also collaborated on the development of the Jdbc-odbc Bridge and the JDBC Driver Test Kit.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.