42 writing data from any data source with a tabular format. |
42 writing data from any data source with a tabular format. |
43 The reader/writer facility, available through the |
43 The reader/writer facility, available through the |
44 <code>javax.sql.RowSet</code> group of interfaces, can be customized to |
44 <code>javax.sql.RowSet</code> group of interfaces, can be customized to |
45 use and update data from a spread sheet, flat file, or any other tabular |
45 use and update data from a spread sheet, flat file, or any other tabular |
46 data source. |
46 data source. |
47 <P> |
47 |
48 <h2>What the JDBC<sup><font size=-2>TM</font></sup> 4.2 API Includes</h2> |
48 <h2>What the JDBC<sup><font size=-2>TM</font></sup> 4.2 API Includes</h2> |
49 The JDBC<sup><font size=-2>TM</font></sup> 4.2 API includes both |
49 The JDBC<sup><font size=-2>TM</font></sup> 4.2 API includes both |
50 the <code>java.sql</code> package, referred to as the JDBC core API, |
50 the <code>java.sql</code> package, referred to as the JDBC core API, |
51 and the <code>javax.sql</code> package, referred to as the JDBC Optional |
51 and the <code>javax.sql</code> package, referred to as the JDBC Optional |
52 Package API. This complete JDBC API |
52 Package API. This complete JDBC API |
54 Standard Edition (Java SE<sup><font size=-2>TM</font></sup>), version 7. |
54 Standard Edition (Java SE<sup><font size=-2>TM</font></sup>), version 7. |
55 The <code>javax.sql</code> package extends the functionality of the JDBC API |
55 The <code>javax.sql</code> package extends the functionality of the JDBC API |
56 from a client-side API to a server-side API, and it is an essential part |
56 from a client-side API to a server-side API, and it is an essential part |
57 of the Java<sup><font size=-2>TM</font></sup> Enterprise Edition |
57 of the Java<sup><font size=-2>TM</font></sup> Enterprise Edition |
58 (Java EE<sup><font size=-2>TM</font></sup>) technology. |
58 (Java EE<sup><font size=-2>TM</font></sup>) technology. |
59 <P> |
59 |
60 <h2>Versions</h2> |
60 <h2>Versions</h2> |
61 The JDBC 4.2 API incorporates all of the previous JDBC API versions: |
61 The JDBC 4.2 API incorporates all of the previous JDBC API versions: |
62 <UL> |
62 <UL> |
63 <LI> The JDBC 4.1 API</li> |
63 <LI> The JDBC 4.1 API</li> |
64 <LI> The JDBC 4.0 API</li> |
64 <LI> The JDBC 4.0 API</li> |
99 <b>NOTE:</b> The class <code>SQLPermission</code> was added in the |
99 <b>NOTE:</b> The class <code>SQLPermission</code> was added in the |
100 Java<sup><font size=-2>TM</font></sup> 2 SDK, Standard Edition, |
100 Java<sup><font size=-2>TM</font></sup> 2 SDK, Standard Edition, |
101 version 1.3 release. This class is used to prevent unauthorized |
101 version 1.3 release. This class is used to prevent unauthorized |
102 access to the logging stream associated with the <code>DriverManager</code>, |
102 access to the logging stream associated with the <code>DriverManager</code>, |
103 which may contain information such as table names, column data, and so on. |
103 which may contain information such as table names, column data, and so on. |
104 <p> |
|
105 |
104 |
106 <h2>What the <code>java.sql</code> Package Contains</h2> |
105 <h2>What the <code>java.sql</code> Package Contains</h2> |
107 The <code>java.sql</code> package contains API for the following: |
106 The <code>java.sql</code> package contains API for the following: |
108 <UL> |
107 <UL> |
109 <LI>Making a connection with a database via the <code>DriverManager</code> facility |
108 <LI>Making a connection with a database via the <code>DriverManager</code> facility |
179 been truncated |
178 been truncated |
180 <LI><code>BatchUpdateException</code> -- thrown to indicate that not all |
179 <LI><code>BatchUpdateException</code> -- thrown to indicate that not all |
181 commands in a batch update executed successfully |
180 commands in a batch update executed successfully |
182 </UL> |
181 </UL> |
183 </UL> |
182 </UL> |
184 <P> |
183 |
185 <h3><code>java.sql</code> and <code>javax.sql</code> Features Introduced in the JDBC 4.2 API</h3> |
184 <h3><code>java.sql</code> and <code>javax.sql</code> Features Introduced in the JDBC 4.2 API</h3> |
186 <UL> |
185 <UL> |
187 <LI>Added <code>JDBCType</code> enum and <code>SQLType</code> interface</li> |
186 <LI>Added <code>JDBCType</code> enum and <code>SQLType</code> interface</li> |
188 <LI>Support for <code>REF CURSORS</code> in <code>CallableStatement</code> |
187 <LI>Support for <code>REF CURSORS</code> in <code>CallableStatement</code> |
189 </LI> |
188 </LI> |
190 <LI><code>DatabaseMetaData</code> methods to return maximum Logical LOB size |
189 <LI><code>DatabaseMetaData</code> methods to return maximum Logical LOB size |
191 and if Ref Cursors are supported</LI> |
190 and if Ref Cursors are supported</LI> |
192 <LI>Added support for large update counts</LI> |
191 <LI>Added support for large update counts</LI> |
193 |
192 |
194 </UL> |
193 </UL> |
195 <P> |
194 |
196 <h3><code>java.sql</code> and <code>javax.sql</code> Features Introduced in the JDBC 4.1 API</h3> |
195 <h3><code>java.sql</code> and <code>javax.sql</code> Features Introduced in the JDBC 4.1 API</h3> |
197 <UL> |
196 <UL> |
198 <LI>Allow <code>Connection</code>, |
197 <LI>Allow <code>Connection</code>, |
199 <code>ResultSet</code> and <code>Statement</code> objects to be |
198 <code>ResultSet</code> and <code>Statement</code> objects to be |
200 used with the try-with-resources statement</LI> |
199 used with the try-with-resources statement</LI> |
229 <li>Availability to be notified when a <code>PreparedStatement</code> that is associated |
228 <li>Availability to be notified when a <code>PreparedStatement</code> that is associated |
230 with a <code>PooledConnection</code> has been closed or the driver determines is invalid |
229 with a <code>PooledConnection</code> has been closed or the driver determines is invalid |
231 |
230 |
232 |
231 |
233 </UL> |
232 </UL> |
234 <P> |
233 |
235 <P> |
234 |
236 <h3><code>java.sql</code> and <code>javax.sql</code> Features Introduced in the JDBC 3.0 API</h3> |
235 <h3><code>java.sql</code> and <code>javax.sql</code> Features Introduced in the JDBC 3.0 API</h3> |
237 <UL> |
236 <UL> |
238 <LI>Pooled statements -- reuse of statements associated with a pooled |
237 <LI>Pooled statements -- reuse of statements associated with a pooled |
239 connection |
238 connection |
240 <LI>Savepoints -- allow a transaction to be rolled back to a designated |
239 <LI>Savepoints -- allow a transaction to be rolled back to a designated |
256 <code>CLOB</code>, <code>ARRAY</code>, and <code>REF</code> values. |
255 <code>CLOB</code>, <code>ARRAY</code>, and <code>REF</code> values. |
257 <LI>Addition of the <code>java.sql.Types.DATALINK</code> data type -- |
256 <LI>Addition of the <code>java.sql.Types.DATALINK</code> data type -- |
258 allows JDBC drivers access to objects stored outside a data source |
257 allows JDBC drivers access to objects stored outside a data source |
259 <LI>Addition of metadata for retrieving SQL type hierarchies |
258 <LI>Addition of metadata for retrieving SQL type hierarchies |
260 </UL> |
259 </UL> |
261 <P> |
260 |
262 <h3><code>java.sql</code> Features Introduced in the JDBC 2.1 Core API</h3> |
261 <h3><code>java.sql</code> Features Introduced in the JDBC 2.1 Core API</h3> |
263 <UL> |
262 <UL> |
264 <LI>Scrollable result sets--using new methods in the <code>ResultSet</code> |
263 <LI>Scrollable result sets--using new methods in the <code>ResultSet</code> |
265 interface that allow the cursor to be moved to a particular row or to a |
264 interface that allow the cursor to be moved to a particular row or to a |
266 position relative to its current position |
265 position relative to its current position |
271 <LI>Miscellaneous features, including performance hints, the use of character |
270 <LI>Miscellaneous features, including performance hints, the use of character |
272 streams, full precision for <code>java.math.BigDecimal</code> values, |
271 streams, full precision for <code>java.math.BigDecimal</code> values, |
273 additional security, and |
272 additional security, and |
274 support for time zones in date, time, and timestamp values. |
273 support for time zones in date, time, and timestamp values. |
275 </UL> |
274 </UL> |
276 <P> |
275 |
277 <h3><code>javax.sql</code> Features Introduced in the JDBC 2.0 Optional |
276 <h3><code>javax.sql</code> Features Introduced in the JDBC 2.0 Optional |
278 Package API</h3> |
277 Package API</h3> |
279 <UL> |
278 <UL> |
280 <LI>The <code>DataSource</code> interface as a means of making a connection. The |
279 <LI>The <code>DataSource</code> interface as a means of making a connection. The |
281 Java Naming and Directory Interface<sup><font size=-2>TM</font></sup> |
280 Java Naming and Directory Interface<sup><font size=-2>TM</font></sup> |
285 <LI>Distributed transactions -- allowing a transaction to span diverse |
284 <LI>Distributed transactions -- allowing a transaction to span diverse |
286 DBMS servers |
285 DBMS servers |
287 <LI><code>RowSet</code> technology -- providing a convenient means of |
286 <LI><code>RowSet</code> technology -- providing a convenient means of |
288 handling and passing data |
287 handling and passing data |
289 </UL> |
288 </UL> |
290 <P> |
289 |
291 <P> |
290 |
292 <h3>Custom Mapping of UDTs</h3> |
291 <h3>Custom Mapping of UDTs</h3> |
293 A user-defined type (UDT) defined in SQL can be mapped to a class in the Java |
292 A user-defined type (UDT) defined in SQL can be mapped to a class in the Java |
294 programming language. An SQL structured type or an SQL <code>DISTINCT</code> |
293 programming language. An SQL structured type or an SQL <code>DISTINCT</code> |
295 type are the UDTs that may be custom mapped. The following three |
294 type are the UDTs that may be custom mapped. The following three |
296 steps set up a custom mapping: |
295 steps set up a custom mapping: |
323 |
322 |
324 <h2>Related Documentation</h2> |
323 <h2>Related Documentation</h2> |
325 |
324 |
326 <ul> |
325 <ul> |
327 <li><a href="../../../technotes/guides/jdbc/getstart/GettingStartedTOC.fm.html">Getting Started</a>--overviews of the major interfaces |
326 <li><a href="../../../technotes/guides/jdbc/getstart/GettingStartedTOC.fm.html">Getting Started</a>--overviews of the major interfaces |
328 <P> |
327 |
329 <li><a href="http://java.sun.com/docs/books/tutorial/jdbc">Chapters on the JDBC |
328 <li><a href="http://java.sun.com/docs/books/tutorial/jdbc">Chapters on the JDBC |
330 API</a>--from the online version of <i>The Java Tutorial Continued</i> |
329 API</a>--from the online version of <i>The Java Tutorial Continued</i> |
331 <P> |
330 |
332 <li><a href="http://java.sun.com/docs/books/jdbc"> |
331 <li><a href="http://java.sun.com/docs/books/jdbc"> |
333 <i>JDBC<sup><font size=-2>TM</font></sup>API Tutorial and Reference, |
332 <i>JDBC<sup><font size=-2>TM</font></sup>API Tutorial and Reference, |
334 Third Edition</i></a>-- |
333 Third Edition</i></a>-- |
335 a complete reference and tutorial for the JDBC 3.0 API |
334 a complete reference and tutorial for the JDBC 3.0 API |
336 </ul> |
335 </ul> |
337 <P> |
336 |
338 @since 1.1 |
337 @since 1.1 |
339 </body> |
338 </body> |
340 </html> |
339 </html> |