Java Reference
In-Depth Information
24
Accessing Databases with
JDBC
It is a capital mistake to
theorize before one has data.
—Arthur Conan Doyle
Now go, write it before them in
a table, and note it in a book,
that it may be for the time to
come for ever and ever.
—The Holy Bible, Isaiah 30:8
Get your facts first, and then
you can distort them as much as
you please.
—Mark Twain
I like two kinds of men:
domestic and foreign.
—Mae West
Objectives
In this chapter you'll learn:
Relational database concepts.
■
To use Structured Query
Language (SQL) to retrieve
data from and manipulate
data in a database.
■
To use the JDBC™ API to
access databases.
■
To use the
RowSet
interface
from package
javax.sql
to
manipulate databases.
■
To use JDBC 4's automatic
JDBC driver discovery.
■
To create precompiled SQL
statements with parameters
via
PreparedStatement
s.
■
How transaction processing
makes database applications
more robust.
■