jdbc api

JDBC API is mainly divided into two package. Each when we are using JDBC, we have to import these packages to use classes and interfaces in our application.

JDBC API主要分为两个包。 每次使用JDBC时,我们都必须导入这些包才能在应用程序中使用类和接口。

  1. java.sql java.sql
  2. javax.sql javax.sql

(java.sql package)

This package include classes and interface to perform almost all JDBC operation such as creating and executing SQL Queries.

该软件包包括用于执行几乎所有JDBC操作(例如创建和执行SQL查询)的类和接口。

java.sql包的重要类和接口 (Important classes and interface of java.sql package)

classes/interface

Description

java.sql.BLOB

Provide support for BLOB(Binary Large Object) SQL type.

java.sql.Connection

creates a connection with specific database

java.sql.CallableStatement

Execute stored procedures

java.sql.CLOB

Provide support for CLOB(Character Large Object) SQL type.

java.sql.Date

Provide support for Date SQL type.

java.sql.Driver

create an instance of a driver with the DriverManager.

java.sql.DriverManager

This class manages database drivers.

java.sql.PreparedStatement

Used to create and execute parameterized query.

java.sql.ResultSet

It is an interface that provide methods to access the result row-by-row.

java.sql.Savepoint

Specify savepoint in transaction.

java.sql.SQLException

Encapsulate all JDBC related exception.

java.sql.Statement

This interface is used to execute SQL statements.

DatabaseMetaData

Comprehensive information about the database as a whole.

DriverAction

An interface that must be implemented when a Driver wants to be notified by DriverManager.

ResultSetMetaData

An object that can be used to get information about the types and properties of the columns in a ResultSet object.

RowId

The representation (mapping) in the Java programming language of an SQL ROWID value.

Savepoint

The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback

SQLData

The interface used for the custom mapping of an SQL user-defined type (UDT) to a class in the Java programming language.

SQLInput

An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type.

SQLOutput

The output stream for writing the attributes of a user-defined type back to the database.

SQLType

An object that is used to identify a generic SQL type, called a JDBC type or a vendor specific data type.

SQLXML

cThe mapping in the JavaTM programming language for the SQL XML type.

Statement

The object used for executing a static SQL statement and returning the results it produces.

Struct

The standard mapping in the Java programming language for an SQL structured type.

Wrapper

Interface for JDBC classes which provide the ability to retrieve the delegate instance when the instance in question is in fact a proxy class.

类/接口

描述

java.sql.BLOB

提供对BLOB(二进制大对象)SQL类型的支持。

java.sql.Connection

创建与特定数据库的连接

java.sql.CallableStatement

执行存储过程

java.sql.CLOB

提供对CLOB(字符大对象)SQL类型的支持。

java.sql.Date

提供对Date SQL类型的支持。

java.sql.Driver

使用DriverManager创建驱动程序的实例。

java.sql.DriverManager

此类管理数据库驱动程序。

java.sql.PreparedStatement

用于创建和执行参数化查询。

java.sql.ResultSet

它是一个接口,提供用于逐行访问结果的方法。

java.sql.Savepoint

在事务中指定保存点。

java.sql.SQLException

封装所有与JDBC相关的异常。

java.sql.Statement

此接口用于执行SQL语句。

数据库元数据

有关整个数据库的全面信息。

DriverAction

当要通过DriverManager通知驱动程序时必须实现的接口。

ResultSetMetaData

可用于获取有关ResultSet对象中列的类型和属性的信息的对象。

行编号

Java编程语言中SQL ROWID值的表示(映射)。

保存点

Connection.rollback方法中引用该点。

SQL数据

用于将SQL用户定义类型(UDT)自定义映射到Java编程语言中的类的接口。

SQL输入

输入流,其中包含代表SQL结构化类型或SQL不同类型的实例的值的流。

SQL输出

用于将用户定义类型的属性写回到数据库的输出流。

SQL类型

用于标识通用SQL类型(称为JDBC类型或特定于供应商的数据类型)的对象。

SQLXML

c使用JavaTM编程语言针对SQL XML类型的映射。

声明

用于执行静态SQL语句并返回其产生的结果的对象。

结构

Java编程语言中用于SQL结构化类型的标准映射。

包装纸

JDBC类的接口,当相关实例实际上是代理类时,该接口提供检索委托实例的功能。

(The javax.sql package)

This package is also known as JDBC extension API. It provides classes and interface to access server-side data.

该软件包也称为JDBC扩展API。 它提供了类和接口来访问服务器端数据。

javax.sql包的重要类和接口 (Important classes and interface of javax.sql package)

classes/interface

Description

javax.sql.ConnectionEvent

Provide information about occurence of event.

javax.sql.ConnectionEventListener

Used to register event generated by PooledConnection

javax.sql.DataSource

Represent the DataSource

javax.sql.PooledConnection

provide object to manage connection pools.

CommonDataSource

Interface that defines the methods which are common between DataSource, XADataSource and ConnectionPoolDataSource.

RowSet

The interface that adds support to the JDBC API for the JavaBeans™ component model.

RowSetInternal

The interface that a RowSet object implements in order to present itself to a RowSetReader or RowSetWriter

RowSetListener

An interface that must be implemented by a component that wants to be notified when a significant event happens in the life of a RowSet

RowSetMetaData

An object that contains information about the columns in a RowSet

RowSetReader

The facility that a disconnected RowSet

RowSetWriter

An object that implements the RowSetWriter interface, called a writer.

StatementEventListener

An object that registers to be notified of events that occur on PreparedStatements that are in the Statement pool.

XAConnection

An object that provides support for distributed transactions.

XADataSource

A factory for XAConnection objects that is used internally.

类/接口

描述

javax.sql.ConnectionEvent

提供有关事件发生的信息。

javax.sql.ConnectionEventListener

PooledConnection对象生成的事件。

javax.sql.DataSource

DataSource接口。

javax.sql.PooledConnection

提供对象来管理连接池。

CommonDataSource

DataSource,XADataSource和ConnectionPoolDataSource之间通用方法的接口

行集

该接口增加了对JavaBeans™组件模型的JDBC API的支持。

RowSetInternal

RowSetReader或RowSetWriter对象。

RowSetListener

RowSet对象的生存期内发生重大事件时通知的组件实现。

RowSetMetaData

RowSet对象中列的信息的对象。

RowSetReader

RowSet对象调用的功能是用数据行填充自身。

RowSetWriter

RowSetWriter接口的对象,称为writer

StatementEventListener

一个对象,注册该对象以通知语句池中PreparedStatement上发生的事件。

XA连接

提供对分布式事务的支持的对象。

XADataSource

XAConnection对象的工厂。