JDBC Structure


Basically an application talks JDBC API to the JDBC manager.  At this point there is a bridge which links the application with the database.
                                        |
        JDBC API               |      Bridge
app <--------->   JDBC   |  <---------> ODBC   <--------> DBMS Driver <------> DBMS
               Manager            |                    Manager
                                        |
                                        |

So in our model...

The app is the client, JDBC API and manager is the middleware and everything else, thereafter, is the backend.

All that we (the application) need is a set of services to be provided - these are provided using the API and interrogating the JDBC Manager.

The Services are...
 

 


The JDBC API
 

Classes

DriverManager

This class is used to load a JDBC driver and establish it as an available driver. Services available:

DriverPropertyInfo

This class is for obtaining and setting properties for a loaded JDBC driver - main use is debugging.

Numeric

This special fixed-point, high precision number class is used to store the SQL data types NUMERIC and DECIMAL.
 

Time and TimeStamp

The class Time is the an SQL-JDBC data conversion class.

Types

This class contains the SQL data types as constants

Interfaces

CallableStatement

This is the primary interface to access stored procedures on a database.

Connection

This is the high-level class used to interact with a database.
 

DatabaseMetaData

This class contains useful information about the open connection to the database.

Driver

The JDBC driver implements this interface.

PreparedStatement

This set of methods set the parameter at the paramIndex location in the prepared query to the specified paramType object.
 

ResultSet

The results of a query are stored in this object, which is returned when the respective query execute method is  run for the statement, preparedStatement and CallableStatement methods.

ResultSetMetaData

This method allows access to information about query’s results, but not the results themselves.

Exceptions

Last Updated: 3rdSeptember 1997 by  Mark Baker