10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /**
27 *
28 * Provides the API for accessing and processing data stored in a
29 * data source (usually a relational database) using the
30 * Java™ programming language.
31 * This API includes a framework whereby different
32 * drivers can be installed dynamically to access different data sources.
33 * Although the JDBC™ API is mainly geared
34 * to passing SQL statements to a database, it provides for reading and
35 * writing data from any data source with a tabular format.
36 * The reader/writer facility, available through the
37 * {@code javax.sql.RowSet} group of interfaces, can be customized to
38 * use and update data from a spread sheet, flat file, or any other tabular
39 * data source.
40 *
41 * <h2>What the JDBC™ 4.3 API Includes</h2>
42 * The JDBC™ 4.3 API includes both
43 * the {@code java.sql} package, referred to as the JDBC core API,
44 * and the {@code javax.sql} package, referred to as the JDBC Optional
45 * Package API. This complete JDBC API
46 * is included in the Java™ Standard Edition (Java SE™), version 7.
47 * The {@code javax.sql} package extends the functionality of the JDBC API
48 * from a client-side API to a server-side API, and it is an essential part
49 * of the Java™ Enterprise Edition
50 * (Java EE™) technology.
51 *
52 * <h2>Versions</h2>
53 * The JDBC 4.3 API incorporates all of the previous JDBC API versions:
54 * <UL>
55 * <LI> The JDBC 4.2 API</li>
56 * <LI> The JDBC 4.1 API</li>
57 * <LI> The JDBC 4.0 API</li>
58 * <LI> The JDBC 3.0 API</li>
59 * <LI> The JDBC 2.1 core API</li>
60 * <LI> The JDBC 2.0 Optional Package API<br>
61 * (Note that the JDBC 2.1 core API and the JDBC 2.0 Optional Package
62 * API together are referred to as the JDBC 2.0 API.)</li>
63 * <LI> The JDBC 1.2 API</li>
64 * <LI> The JDBC 1.0 API</li>
65 * </UL>
66 * <P>
67 * Classes, interfaces, methods, fields, constructors, and exceptions
68 * have the following "since" tags that indicate when they were introduced
69 * into the Java platform. When these "since" tags are used in
70 * Javadoc™ comments for the JDBC API,
71 * they indicate the following:
72 * <UL>
73 * <LI>Since 9 -- new in the JDBC 4.3 API and part of the Java SE platform,
74 * version 9</li>
75 * <LI>Since 1.8 -- new in the JDBC 4.2 API and part of the Java SE platform,
76 * version 8</li>
77 * <LI>Since 1.7 -- new in the JDBC 4.1 API and part of the Java SE platform,
78 * version 7</li>
79 * <LI>Since 1.6 -- new in the JDBC 4.0 API and part of the Java SE platform,
80 * version 6</li>
81 * <LI>Since 1.4 -- new in the JDBC 3.0 API and part of the J2SE platform,
82 * version 1.4</li>
83 * <LI>Since 1.2 -- new in the JDBC 2.0 API and part of the J2SE platform,
84 * version 1.2</li>
85 * <LI>Since 1.1 or no "since" tag -- in the original JDBC 1.0 API and part of
86 * the JDK™, version 1.1</li>
87 * </UL>
88 * <P>
89 * <b>NOTE:</b> Many of the new features are optional; consequently, there is
90 * some variation in drivers and the features they support. Always
91 * check your driver's documentation to see whether it supports a feature before
92 * you try to use it.
93 * <P>
94 * <b>NOTE:</b> The class {@code SQLPermission} was added in the
95 * Java™ 2 SDK, Standard Edition,
96 * version 1.3 release. This class is used to prevent unauthorized
97 * access to the logging stream associated with the {@code DriverManager},
98 * which may contain information such as table names, column data, and so on.
99 *
100 * <h2>What the {@code java.sql} Package Contains</h2>
101 * The {@code java.sql} package contains API for the following:
102 * <UL>
103 * <LI>Making a connection with a database via the {@code DriverManager} facility
104 * <UL>
105 * <LI>{@code DriverManager} class -- makes a connection with a driver
106 * <LI>{@code SQLPermission} class -- provides permission when code
107 * running within a Security Manager, such as an applet,
108 * attempts to set up a logging stream through the
109 * {@code DriverManager}
110 * <LI>{@code Driver} interface -- provides the API for registering
111 * and connecting drivers based on JDBC technology ("JDBC drivers");
112 * generally used only by the {@code DriverManager} class
113 * <LI>{@code DriverPropertyInfo} class -- provides properties for a
114 * JDBC driver; not used by the general user
115 * </UL>
271 *
272 * <h3>{@code java.sql} Features Introduced in the JDBC 2.1 Core API</h3>
273 * <UL>
274 * <LI>Scrollable result sets--using new methods in the {@code ResultSet}
275 * interface that allow the cursor to be moved to a particular row or to a
276 * position relative to its current position
277 * <LI>Batch updates
278 * <LI>Programmatic updates--using {@code ResultSet} updater methods
279 * <LI>New data types--interfaces mapping the SQL3 data types
280 * <LI>Custom mapping of user-defined types (UDTs)
281 * <LI>Miscellaneous features, including performance hints, the use of character
282 * streams, full precision for {@code java.math.BigDecimal} values,
283 * additional security, and
284 * support for time zones in date, time, and timestamp values.
285 * </UL>
286 *
287 * <h3>{@code javax.sql} Features Introduced in the JDBC 2.0 Optional
288 * Package API</h3>
289 * <UL>
290 * <LI>The {@code DataSource} interface as a means of making a connection. The
291 * Java Naming and Directory Interface™
292 * (JNDI) is used for registering a {@code DataSource} object with a
293 * naming service and also for retrieving it.
294 * <LI>Pooled connections -- allowing connections to be used and reused
295 * <LI>Distributed transactions -- allowing a transaction to span diverse
296 * DBMS servers
297 * <LI>{@code RowSet} technology -- providing a convenient means of
298 * handling and passing data
299 * </UL>
300 *
301 *
302 * <h3>Custom Mapping of UDTs</h3>
303 * A user-defined type (UDT) defined in SQL can be mapped to a class in the Java
304 * programming language. An SQL structured type or an SQL {@code DISTINCT}
305 * type are the UDTs that may be custom mapped. The following three
306 * steps set up a custom mapping:
307 * <ol>
308 * <li>Defining the SQL structured type or {@code DISTINCT} type in SQL
309 * <li>Defining the class in the Java programming language to which the
310 * SQL UDT will be mapped. This class must implement the
311 * {@code SQLData} interface.
317 * {@code SQLData} interface
318 * </ul>
319 * </ol>
320 * <p>
321 * When these are in place for a UDT, calling the methods
322 * {@code ResultSet.getObject} or {@code CallableStatement.getObject}
323 * on that UDT will automatically retrieve the custom mapping for it. Also, the
324 * {@code PreparedStatement.setObject} method will automatically map the
325 * object back to its SQL type to store it in the data source.
326 *
327 * <h2>Package Specification</h2>
328 *
329 * <ul>
330 * <li><a href="https://jcp.org/en/jsr/detail?id=221">JDBC 4.3 Specification</a>
331 * </ul>
332 *
333 * <h2>Related Documentation</h2>
334 *
335 * <ul>
336 * <li><a href="http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html">
337 * Lesson:JDBC Basics(The Javaxx Tutorials > JDBC™ Database Access)</a>
338 *
339 * <li>“<i>JDBC™ API Tutorial and Reference, Third Edition</i>”
340 * </ul>
341 */
342 package java.sql;
|
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /**
27 *
28 * Provides the API for accessing and processing data stored in a
29 * data source (usually a relational database) using the
30 * Java programming language.
31 * This API includes a framework whereby different
32 * drivers can be installed dynamically to access different data sources.
33 * Although the JDBC API is mainly geared
34 * to passing SQL statements to a database, it provides for reading and
35 * writing data from any data source with a tabular format.
36 * The reader/writer facility, available through the
37 * {@code javax.sql.RowSet} group of interfaces, can be customized to
38 * use and update data from a spread sheet, flat file, or any other tabular
39 * data source.
40 *
41 * <h2>What the JDBC 4.3 API Includes</h2>
42 * The JDBC 4.3 API includes both
43 * the {@code java.sql} package, referred to as the JDBC core API,
44 * and the {@code javax.sql} package, referred to as the JDBC Optional
45 * Package API. This complete JDBC API
46 * is included in the Java Standard Edition (Java SE), version 7.
47 * The {@code javax.sql} package extends the functionality of the JDBC API
48 * from a client-side API to a server-side API, and it is an essential part
49 * of the Java Enterprise Edition
50 * (Java EE) technology.
51 *
52 * <h2>Versions</h2>
53 * The JDBC 4.3 API incorporates all of the previous JDBC API versions:
54 * <UL>
55 * <LI> The JDBC 4.2 API</li>
56 * <LI> The JDBC 4.1 API</li>
57 * <LI> The JDBC 4.0 API</li>
58 * <LI> The JDBC 3.0 API</li>
59 * <LI> The JDBC 2.1 core API</li>
60 * <LI> The JDBC 2.0 Optional Package API<br>
61 * (Note that the JDBC 2.1 core API and the JDBC 2.0 Optional Package
62 * API together are referred to as the JDBC 2.0 API.)</li>
63 * <LI> The JDBC 1.2 API</li>
64 * <LI> The JDBC 1.0 API</li>
65 * </UL>
66 * <P>
67 * Classes, interfaces, methods, fields, constructors, and exceptions
68 * have the following "since" tags that indicate when they were introduced
69 * into the Java platform. When these "since" tags are used in
70 * Javadoc comments for the JDBC API,
71 * they indicate the following:
72 * <UL>
73 * <LI>Since 9 -- new in the JDBC 4.3 API and part of the Java SE platform,
74 * version 9</li>
75 * <LI>Since 1.8 -- new in the JDBC 4.2 API and part of the Java SE platform,
76 * version 8</li>
77 * <LI>Since 1.7 -- new in the JDBC 4.1 API and part of the Java SE platform,
78 * version 7</li>
79 * <LI>Since 1.6 -- new in the JDBC 4.0 API and part of the Java SE platform,
80 * version 6</li>
81 * <LI>Since 1.4 -- new in the JDBC 3.0 API and part of the J2SE platform,
82 * version 1.4</li>
83 * <LI>Since 1.2 -- new in the JDBC 2.0 API and part of the J2SE platform,
84 * version 1.2</li>
85 * <LI>Since 1.1 or no "since" tag -- in the original JDBC 1.0 API and part of
86 * the JDK, version 1.1</li>
87 * </UL>
88 * <P>
89 * <b>NOTE:</b> Many of the new features are optional; consequently, there is
90 * some variation in drivers and the features they support. Always
91 * check your driver's documentation to see whether it supports a feature before
92 * you try to use it.
93 * <P>
94 * <b>NOTE:</b> The class {@code SQLPermission} was added in the
95 * Java 2 SDK, Standard Edition,
96 * version 1.3 release. This class is used to prevent unauthorized
97 * access to the logging stream associated with the {@code DriverManager},
98 * which may contain information such as table names, column data, and so on.
99 *
100 * <h2>What the {@code java.sql} Package Contains</h2>
101 * The {@code java.sql} package contains API for the following:
102 * <UL>
103 * <LI>Making a connection with a database via the {@code DriverManager} facility
104 * <UL>
105 * <LI>{@code DriverManager} class -- makes a connection with a driver
106 * <LI>{@code SQLPermission} class -- provides permission when code
107 * running within a Security Manager, such as an applet,
108 * attempts to set up a logging stream through the
109 * {@code DriverManager}
110 * <LI>{@code Driver} interface -- provides the API for registering
111 * and connecting drivers based on JDBC technology ("JDBC drivers");
112 * generally used only by the {@code DriverManager} class
113 * <LI>{@code DriverPropertyInfo} class -- provides properties for a
114 * JDBC driver; not used by the general user
115 * </UL>
271 *
272 * <h3>{@code java.sql} Features Introduced in the JDBC 2.1 Core API</h3>
273 * <UL>
274 * <LI>Scrollable result sets--using new methods in the {@code ResultSet}
275 * interface that allow the cursor to be moved to a particular row or to a
276 * position relative to its current position
277 * <LI>Batch updates
278 * <LI>Programmatic updates--using {@code ResultSet} updater methods
279 * <LI>New data types--interfaces mapping the SQL3 data types
280 * <LI>Custom mapping of user-defined types (UDTs)
281 * <LI>Miscellaneous features, including performance hints, the use of character
282 * streams, full precision for {@code java.math.BigDecimal} values,
283 * additional security, and
284 * support for time zones in date, time, and timestamp values.
285 * </UL>
286 *
287 * <h3>{@code javax.sql} Features Introduced in the JDBC 2.0 Optional
288 * Package API</h3>
289 * <UL>
290 * <LI>The {@code DataSource} interface as a means of making a connection. The
291 * Java Naming and Directory Interface
292 * (JNDI) is used for registering a {@code DataSource} object with a
293 * naming service and also for retrieving it.
294 * <LI>Pooled connections -- allowing connections to be used and reused
295 * <LI>Distributed transactions -- allowing a transaction to span diverse
296 * DBMS servers
297 * <LI>{@code RowSet} technology -- providing a convenient means of
298 * handling and passing data
299 * </UL>
300 *
301 *
302 * <h3>Custom Mapping of UDTs</h3>
303 * A user-defined type (UDT) defined in SQL can be mapped to a class in the Java
304 * programming language. An SQL structured type or an SQL {@code DISTINCT}
305 * type are the UDTs that may be custom mapped. The following three
306 * steps set up a custom mapping:
307 * <ol>
308 * <li>Defining the SQL structured type or {@code DISTINCT} type in SQL
309 * <li>Defining the class in the Java programming language to which the
310 * SQL UDT will be mapped. This class must implement the
311 * {@code SQLData} interface.
317 * {@code SQLData} interface
318 * </ul>
319 * </ol>
320 * <p>
321 * When these are in place for a UDT, calling the methods
322 * {@code ResultSet.getObject} or {@code CallableStatement.getObject}
323 * on that UDT will automatically retrieve the custom mapping for it. Also, the
324 * {@code PreparedStatement.setObject} method will automatically map the
325 * object back to its SQL type to store it in the data source.
326 *
327 * <h2>Package Specification</h2>
328 *
329 * <ul>
330 * <li><a href="https://jcp.org/en/jsr/detail?id=221">JDBC 4.3 Specification</a>
331 * </ul>
332 *
333 * <h2>Related Documentation</h2>
334 *
335 * <ul>
336 * <li><a href="http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html">
337 * Lesson:JDBC Basics(The Javaxx Tutorials > JDBC Database Access)</a>
338 *
339 * <li>“<i>JDBC API Tutorial and Reference, Third Edition</i>”
340 * </ul>
341 */
342 package java.sql;
|