O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

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

Introduction

The previous chapters introduced us to the all-important JDBC package and saw how to connect to the database and execute SQL statements. In this chapter, we will look at a common technique for optimizing SQL statement execution using prepared statements and we will examine how we examine the results of our queries using result sets.

As we will see, the PreparedStatement interface provides methods to optimize the query process using the capability of many databases to prepare a database query before it is executed. This preparation process usually involves parsing the query, identifying the query path (how the data in the tables will be accessed), and saving the information so that the query can be executed by simply finding the prepared ...

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