Chapter 1. Introduction to JDBC
Oracle JDBC is where the write-once-run-anywhere database meets Java, the write-once-run-anywhere programming language. JDBC acts as the bridge between Oracle and Java. But what is JDBC? JDBC is a Java API for executing dynamic SQL statements. Oracle JDBC is for executing dynamic SQL statements in a standard way and for leveraging Oracle’s extended functionality. Consequently, when you use Oracle as your persistent storage, you have to make a decision early on as to whether to program for portability or for additional performance and functionality.
Before we start our discussion on how you can use JDBC, I think it’s appropriate to cover some required background information. In this chapter, we’ll start by looking at the architecture of the JDBC API. Then we’ll continue by defining client/server and four different types of Oracle clients. Finally, we’ll finish with my soapbox speech about how it’s important to use the set capabilities of SQL.
The JDBC API
In this section, I will try to give you the big picture of the JDBC API. Given this overview, you’ll have a contextual foundation on which to lay your knowledge as you build it chapter by chapter while reading this book.
The JDBC API is based mainly on a set of interfaces, not classes. It’s up to the manufacturer of the driver to implement the interfaces with their own set of classes. Figure 1-1 is a class diagram that shows the basic JDBC classes and interfaces; these make up the core API. Notice that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access