O'Reilly logo

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology by Greg Barish

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JDBC Concepts and Objects

When developers use JDBC, they construct SQL statements that can then be executed. These statements are dynamic in the sense that a template-like query string, such as

SELECT name FROM employee WHERE id = ?

can be combined with local data structures so that regular Java objects can be mapped to the bindings in the string (denoted ?). For example, a java.lang.Integer object with the value of 3 can be combined with the template to dynamically form

SELECT name FROM employee WHERE id = 3

The results of execution, if any, are contained in a set returned to the caller. For example, the query may return the following results:

NAME
------
Angela
Andrew
Anthony

We can browse this result set as necessary. This gives us the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required