Saturday 25 August 2012

JDBC API

The JDBCTM API provides universal data access from the JavaTM programming language. Using the JDBC 3.0 API, you can access virtually any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternate interfaces can be built.
The JDBC API is part of the Java platform, which includes the Java™ Standard Edition (Java™ SE ) and the Java™ Enterprise Edition (Java™ EE). The JDBC 4.0 API is divided into two packages:

1). java.sql package

2). the javax.sql package, which adds server-side capabilities
 
 

JDBC Technology Drivers


To use the JDBC API with a particular database management system, you need a JDBC technology-based driver to mediate between JDBC technology and the database. Depending on various factors, a driver might be written purely in the Java programming language or in a mixture of the Java programming language and JavaTM Native Interface (JNI) native methods.
The latest SDK includes a JDBC-ODBC Bridge driver that makes most Open Database Connectivity (ODBC) drivers available to programmers using the JDBC API. JDBC-ODBC Bridge Driver describes the current status of this software. Note that the bridge driver included in the SDK is appropriate only for experimental use or when no other driver is available.

 

Package java.sql contains following Interfaces and classes.

List of Interfaces Summary:

1) Array:-The mapping in the Java programming language for the SQL type ARRAY.
2) Blob:-The representation (mapping) in the JavaTM programming language of an SQL BLOB value.
3) CallableStatement:-The interface used to execute SQL stored procedures.
4) Clob:-The mapping in the JavaTM programming language for the SQL CLOB type.
5) Connection:-A connection (session) with a specific database.
6) DatabaseMetaData:-Comprehensive information about the database as a whole.
7) Driver:-The interface that every driver class must implement.
8) ParameterMetaData:-An object that can be used to get information about the types and properties of the parameters in a PreparedStatement object.
9) PreparedStatement:-An object that represents a precompiled SQL statement.
10) Ref:-The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.
11) ResultSet:-A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
12) ResultSetMetaData:-An object that can be used to get information about the types and properties of the columns in a ResultSet object.
13) Connection:-A connection (session) with a specific database.
14) Savepoint:-The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method.
15) SQLData:-The interface used for the custom mapping of an SQL user-defined type (UDT) to a class in the Java programming language.
16) SQLInput:-An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type.
17) SQLOutput:-The output stream for writing the attributes of a user-defined type back to the database.
18) Statement:-The object used for executing a static SQL statement and returning the results it produces.
19) Struct:-The standard mapping in the Java programming language for an SQL structured type.

List of Classes Summary:

1) Date:-A thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE value.
2) DriverPropertyInfo:-Driver properties for making a connection.
3) SQLPermission:-The permission for which the SecurityManager will check when code that is running in an applet calls the DriverManager.setLogWriter method or the DriverManager.setLogStream (deprecated) method.
4) Time:-A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as an SQL TIME value.
5) Timestamp:-A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.
6) Types:-The class that defines the constants that are used to identify generic SQL types, called JDBC types.

No comments:

Post a Comment