7. Databases and JDBC
Overview
In the following chapter, you will learn how to use Java Database Connectivity (JDBC) to access relational databases from your Java applications. This begins with creating tables in relational databases to store and sort data. Only then can you manipulate these tables by writing basic SQL queries to retrieve and modify that data. Once this baseline is established, you'll be able to apply these skills to Java applications, specifically, in order to access databases and run queries from JDBC. You will further practice using the JDBC PreparedStatement interface to allow for parameterized SQL statements, boosting your speed by cutting out time-consuming and repetitive keystrokes. By the end of this chapter, you will know how to insert and update data from the JDBC, and handle any exceptions it throws with confidence and skill.