Summary

This chapter continued coverage of the JDBC package and examined what we can do after we have connected to the database. Using the PreparedStatement class, we can present our queries to the database before we use them, allowing the database to optimize the query and increasing the speed with which the query will execute when we do use it in our application.

After we have executed our query, we often return data from the database. The JDBC ResultSet interface describes the object we will use to examine the rows returned from the database. JDBC ResultSet objects have been expanded over the years to allow scrollable cursors, the ability to move randomly through a returned data set, and to conveniently update the database using the same ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.