Java Reference
In-Depth Information
CHAPTER
18
Database Programming
Almost every real-world programming application I have ever been a part of
has involved a database. Accessing data in a database is an essential aspect of
any language, and it's no surprise that Java contains extensive support for
database programming. The JDBC API contains the classes and interfaces a
Java program uses to connect to a database and access its contents. In this
chapter, I will discuss an overview of JDBC, how to connect to a database, how
to execute an SQL statement on a database, and how to work with result sets.
An Overview of JDBC
The JDBC API is an API for accessing data in a tabular format, which includes
every popular database as well as spreadsheet applications such as Microsoft
Excel and files that contain tabular data. The latest version of JDBC is 3.0 and
is a part of the J2SE 1.4. JDBC 3.0 is broken down into two packages:
java.sql. Referred to as the JDBC Core API.
javax.sql. Referred to as the JDBC Optional Package API. (In JDBC 2.0,
this package was formerly known as the JDBC Standard Extension API.)
629
Search WWH ::




Custom Search