Chapter 13. PostgreSQL JDBC
Java Database Connectivity (JDBC) is an API that a user allows to connect to a database from within a Java application in a standardized way. The API is independent of a specific database vendor, and allows creation of applications that can easily be adapted for use with different databases.
This chapter describes the way to use JDBC for connecting to a database, and using a PostgreSQL database from within a Java application.
After discussing how to install and initialize the PostgreSQL JDBC driver and opening a connection to a database, the fundamental concepts and features of the JDBC API will be explained.
This chapter covers executing the basic SQL statements introduced in Chapter 5, SQL Language, from within Java code and handling the results returned from a query.
Later in this chapter, the reader will learn how to call stored procedures, and how to access their results.
For this chapter, it is assumed that the reader has a basic knowledge of Java and the usage...