J2EEOnline J2EE





JDBC   «Prev 

JDBC is not an acronym

JDBC is not an acronym or an abbreviation.
Sun had trademarked the term "JDBC' but never officially designated that the letters represented a phrase. Often, people assign their own meaning to it, usually a phrase such as "Java Database Connectivity," but that is not an association created by Sun or Oracle.
JDBC is a Java-based data access technology (Java Standard Edition platform) from Oracle Corporation. This technology is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database and the JDBC API facilitates communication with relational databases. A JDBC-to-ODBC bridge enables connections to any ODBC-accessible data source in the JVM host environment.


Oracle JDBC Drivers

(APIs), Oracle drivers have extensions to support Oracle-specific data types and to enhance performance. Oracle provides the following JDBC drivers:
    Thin driver: It is a pure Java driver used on the client side, without an Oracle client installation. It can be used with both applets and applications.
  1. Oracle Call Interface (OCI) driver: It is used on the client-side with an Oracle client installation. It can be used only with applications.
  2. Server-side Thin driver: It is functionally similar to the client-side Thin driver. However, it is used for code that runs on the database server and needs to access another session either on the same server or on a remote server on any tier.
  3. Server-side internal driver: It is used for code that runs on the database server and accesses the same session. That is, the code runs and accesses data from a single Oracle session.
Figure 3-1 illustrates the architecture of the Oracle JDBC drivers and the Oracle Database.


Figure 3-1 Architecture of the Oracle JDBC Drivers and Oracle Database

JDBC History

Any Java class can use JDBC to connect with a database using a driver. JDBC has been around since 1997, and was added to JSE 1.1 as JDBC 1.0. Since its first version, multiple enhancements have been made to the JDBC API. Java 7 ships with JDBC version 4.1. JDBC classes are defined in Java packages java.sql and javax.sql.
By using the classes and interfaces from the JDBC API, Java classes can connect to a data source, execute SQL (Structured Query Language , the standard language for relational database management systems, RDBMS), and process the results. At the heart of the JDBC API lies the use of SQL to create, modify, and delete database objects like tables, and query and update them. JDBC provides vendor-neutral access to the common database features. Hence, you do not use proprietary features of a database and can easily change the database that you connect to. The JDBC API includes an abstraction of a
  1. database connection,
  2. statements, and
  3. result sets.