Chapter 8. Introduction to JDBC

JDBC is the Java database connectivity API. It is the foundation of all database features in Java. We can avoid using JDBC directly, for example, by using SQLJ to embed SQL statements in our Java code, but this code needs to be processed by an SQLJ preprocessor, which translates our SQLJ statements into JDBC. There are other database technologies for Java, EJB (Enterprise JavaBeans) and JDO (Java Data Objects), which hide JDBC behind the scenes for us and allow us to concentrate on objects, but they require additional software and learning a new way to program.

JDBC is not difficult to program, though it can be somewhat tedious because of the number of classes and methods involved and, especially, the number of ...

Get Java™ Oracle® Database Development 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.