O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

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

Using the Connection Class

Before we can do anything significant with JDBC, we must get connected to the database. As we will find in this chapter, we will not connect directly to the database; we will connect with one or more layers of software, which will control our connection to the database.

As mentioned earlier, there are two distinct approaches for connecting to a database using JDBC: using a DriverManager directly or using a DataSource connection. This chapter presents both approaches.

Loading the Database Driver

There is unfortunately no standard protocol for direct communication with relational databases. Each relational database vendor has created a proprietary low-level protocol for communicating with its database engine.

In the intensely ...

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