JDBC2.0 expansion API (1)

zhaozj2021-02-17  58

JDBC 2.0 API is divided into two parts: JDBC 2.0 core API and JDBC 2.0 standard extension API. The core API is in java.sql. This is the basic functionality that is achieved. Standard expansion API inside javax.sql. Some interfaces from JDBC2.0 regulations are in this. Of course, JDBC2.0 also made some changes to the original version of Java.sql. But not very big. The original JDBC1.0 program can not be modified on JDBC2.0. This is a consistent good style of Java. The latest JDBC package can be downloaded from Sun's website.

The extended API of JDBC2.0 adds some data access and data source access. There are some in this middle that is mainly used to do business calculations. With JDBC2.0's new extension package, JDBC provides a method of accessing a general data from the Java2 platform.

First, let's take a look at how the JDBC standard extension API is combined with JDBC2.0. JDBC2.0 includes two packages:

1, java.sql package, the package is the core API of JDBC2.0. It includes the original JDBC API (JDBC 1.0 version), plus some new version 2.0 of API. This package is in Java 2 Platform SDK.

2, javax.sql package, this is the standard extension API of JDBC2.0. This package is a brand new, provided separately in Java 2 Platform SDK, Enterprise Edition.

The core API of JDBC2.0 includes the API of JDBC1.0 and adds some features on this basis to enhance some performance. Make the Java language provide a unified data access method at the front end of the database calculation, and efficiency has been improved.

JDBC is backward-compatible, JDBC1.0 program can not be modified on JDBC2.0. However, if the new features of JDBC2.0 are used in the program, they must be running on the JDBC2.0 version.

In summary, the new features of the JDBC core API have worked in two aspects. One is to support some new features, the other is to support the data type of SQL3.

1. In supporting new features: including the result set can scroll backward, quantity update data. In addition, a character stream operation of the Unicode character set is also provided.

2, in terms of supporting SQL3 data: including new SQL3 data types, increasing storage of persistent objects.

In order to access the data, more convenient operation, the new feature of JDBC is easier to design the application. For example: data blocks can significantly improve the performance of database access. The newly added BLOB, Clob, and array interfaces can be a data type of the application operational block without having to perform other processing before storage. In this way, it has significantly improves the efficiency of the memory.

转载请注明原文地址:https://www.9cbs.com/read-29941.html

New Post(0)