O'Reilly logo

Java™ Oracle® Database Development by David J. Gallardo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connection Options

To connect to a database, we are faced with a confusing number of alternatives. To begin with, we have to, at a minimum, decide between the two drivers Oracle provides. This is important because the JDBC API consists entirely of interfaces—nothing is implemented in the Java JDK. Choosing a JDBC driver is choosing the JDBC implementation.

The next complication is the fact that each JDBC driver has its own way of specifying connection information. The database URL, username, and password options vary from one to another.

Finally, Sun has suggested that the traditional way of getting a database connection, by loading and registering the driver, may be deprecated in the future. Instead, as of JDBC 3.0, we should be using the

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required