Summary

The process of accessing a database with JDBC involves first accessing an appropriate database driver and then obtaining a connection to the database. In this chapter we explored the process of connecting to the database by examining the JDBC interface that describes the connection to the database—the Connection interface.

Once a connection has been made, we must present a SQL statement to the database to either extract data (using a select query) or update data (using an update query). This requires an appropriate object. In this chapter we examined the Statement interface, which encapsulates the methods required to execute SQL statements against the relational database. The PreparedStatement interface extends the Statement interface ...

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.