Java Reference
In-Depth Information
Chapter 4: Introduction to JDBC
In This Chapter
 
Understanding DriverManager and different types of JDBC drivers
 
Using JDBC DataSources for simple, pooled, and distributed connections
 
Using Statements, PreparedStatements, and CallableStatements
 
Using transactions, isolation levels, and SavePoints
 
Using ResultSets and Rowsets
 
Using MetaData
 
Mapping of SQL data types in JDBC
JDBC is a Java Database Connectivity API that lets you access virtually any tabular
data source from a Java application. In addition to providing connectivity to a wide
range of SQL databases, JDBC allows you to access other tabular data sources such
as spreadsheets or flat files. Although JDBC is often thought of as an acronym for
Java Database Connectivity , the trademarked API name is actually JDBC.
What Is JDBC?
JDBC is a Java Database Connectivity API that lets you access virtually any tabular
data source from a Java application. In addition to providing connectivity to a wide
range of SQL databases, JDBC allows you to access other tabular data sources such
as spreadsheets or flat files. Although JDBC is often thought of as an acronym for
Java Database Connectivity , the trademarked API name is actually JDBC.
JDBC defines a low-level API designed to support basic SQL functionality
independently of any specific SQL implementation. This means the focus is on
executing raw SQL statements and retrieving their results. JDBC is based on the
X/Open SQL Call Level Interface, an international standard for programming access
to SQL databases, which is also the basis for Microsoft's ODBC interface.
The JDBC 2.0 API includes two packages: java.sql, known as the JDBC 2.0 core API;
and javax.sql, known as the JDBC Standard Extension. Together, they contain the
necessary classes to develop database applications using Java. As a core of the
Java 2 Platform, the JDBC is available on any platform running Java.
The JDBC 3.0 Specification, released in October 2001, introduces several features,
including extensions to the support of various data types, additional MetaData
capabilities, and enhancements to a number of interfaces.
The JDBC Extension Package (javax.sql) was introduced to contain the parts of the
JDBC API that are closely related to other pieces of the Java platform that are
themselves optional packages, such as the Java Naming and Directory Interface
(JNDI) and the Java Transaction Service (JTS). In addition, some advanced features
Search WWH ::




Custom Search