Java Tutorial - Java Script :
JDBC
JDBC is the Java Database Connectivity API. JDBC allows Java programs to connect to and access any database supporting a JDBC driver. Although JDBC is traditionally used to access relational databases, a JDBC driver can be created to access almost any information that is organized in a tabular format.
A JDBC Driver that is compliant with the JDBC standard must support the ANSI 92 SQL-2 Entry Level standard commands. This ensures that it will be possible to write database code that is not dependent on the underlying database platform. However, this also means that the code will not be able to leverage any of the advanced features of a specific database and maintain that portability. On the bright side, JDBC allows any command to be passed into
the database engine. The command is not even required to be a SQL command. allows JDBC to be used with proprietary extensions even at the cost of portability. There are basically four types of JDBC drivers: Type 1 through Type 4.
· The Type 1 driver is the JDBC to ODBC (Open DataBase Connectivity) bridge. This was an early driver designed to leverage the availability of the existing set of ODBC drivers. Type 1 drivers are normally very slow and are drivers of last resort.
· Type 2 drivers are essentially Java wrappers around native database interfaces. The Type 2 driver converts JDBC calls into native database API function calls using JNI (Java Native Interface). Type 2 drivers are no longer very common.
· Type 3 drivers are pure Java drivers that use a middleware component to translate JDBC calls to a database-generic communication protocol. The middleware then converts this to the specific protocol required by the target database.
· A Type 4 driver is a native Java driver designed specifically to interact with the target database. Now that JDBC has matured, Type 4 drivers are the most common.
