jdbc api_JDBC API

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包 (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/interfaceDescription
java.sql.BLOBProvide support for BLOB(Binary Large Object) SQL type.
java.sql.Connectioncreates a connection with specific database
java.sql.CallableStatementExecute stored procedures
java.sql.CLOBProvide support for CLOB(Character Large Object) SQL type.
java.sql.DateProvide support for Date SQL type.
java.sql.Drivercreate an instance of a driver with the DriverManager.
java.sql.DriverManagerThis class manages database drivers.
java.sql.PreparedStatementUsed to create and execute parameterized query.
java.sql.ResultSetIt is an interface that provide methods to access the result row-by-row.
java.sql.SavepointSpecify savepoint in transaction.
java.sql.SQLExceptionEncapsulate all JDBC related exception.
java.sql.StatementThis interface is used to execute SQL statements.
DatabaseMetaDataComprehensive information about the database as a whole.
DriverActionAn interface that must be implemented when a Driver wants to be notified by DriverManager.
ResultSetMetaDataAn object that can be used to get information about the types and properties of the columns in a ResultSet object.
RowIdThe representation (mapping) in the Java programming language of an SQL ROWID value.
SavepointThe representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method.
SQLDataThe interface used for the custom mapping of an SQL user-defined type (UDT) to a class in the Java programming language.
SQLInputAn input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type.
SQLOutputThe output stream for writing the attributes of a user-defined type back to the database.
SQLTypeAn object that is used to identify a generic SQL type, called a JDBC type or a vendor specific data type.
SQLXMLcThe mapping in the JavaTM programming language for the SQL XML type.
StatementThe object used for executing a static SQL statement and returning the results it produces.
StructThe standard mapping in the Java programming language for an SQL structured type.
WrapperInterface 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类的接口,当相关实例实际上是代理类时,该接口提供检索委托实例的功能。

javax.sql包 (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/interfaceDescription
javax.sql.ConnectionEventProvide information about occurence of event.
javax.sql.ConnectionEventListenerUsed to register event generated by PooledConnection object.
javax.sql.DataSourceRepresent the DataSource interface used in an application.
javax.sql.PooledConnectionprovide object to manage connection pools.
CommonDataSourceInterface that defines the methods which are common between DataSource, XADataSource and ConnectionPoolDataSource.
RowSetThe interface that adds support to the JDBC API for the JavaBeans™ component model.
RowSetInternalThe interface that a RowSet object implements in order to present itself to a RowSetReader or RowSetWriter object.
RowSetListenerAn interface that must be implemented by a component that wants to be notified when a significant event happens in the life of a RowSet object.
RowSetMetaDataAn object that contains information about the columns in a RowSet object.
RowSetReaderThe facility that a disconnected RowSet object calls on to populate itself with rows of data.
RowSetWriterAn object that implements the RowSetWriter interface, called a writer.
StatementEventListenerAn object that registers to be notified of events that occur on PreparedStatements that are in the Statement pool.
XAConnectionAn object that provides support for distributed transactions.
XADataSourceA 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 RowSet对象实现的接口,以便将自身呈现给RowSetReader或RowSetWriter对象。
RowSetListener 一个接口,必须由要在RowSet对象的生存期内发生重大事件时通知的组件实现。
RowSetMetaData 包含有关RowSet对象中列的信息的对象。
RowSetReader 断开连接的RowSet对象调用的功能是用数据行填充自身。
RowSetWriter 实现RowSetWriter接口的对象,称为writer
StatementEventListener 一个对象,注册该对象以通知语句池中PreparedStatement上发生的事件。
XA连接 提供对分布式事务的支持的对象。
XADataSource 内部使用的XAConnection对象的工厂。

翻译自: https://www.studytonight.com/java/java-sql-package.php

jdbc api

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值