The JDBC Architecture
We have already mentioned that JDBC is a set of interfaces implemented by different vendors. Figure 13-1 shows how database access works from an application’s perspective. Essentially, the application simply makes method calls to the JDBC interfaces. Under the hood, the implementation being used by that application performs the actual database calls.
![]() |
JDBC is divided into two Java packages: java.sql and javax.sql . The java.sql package was the original package that contained all the JDBC classes and interfaces. JDBC 2.0, however, introduced something called the JDBC Optional Package—the javax.sql package—with interfaces that a driver does not have to implement. In fact, the interfaces themselves are not even part of the J2SE as of JDK 1.3 (though it has always been part of the J2EE).
As it turns out, some of the functionality in the JDBC Optional Package is so important that it is no longer “optional” and should instead be part of the J2SE with the release of JDK 1.4. For backwards compatibility, the Optional Package classes remain in javax.sql.
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
