JDBC  «Prev  Next»
Lesson 1

Java Database Connections

Looking at the work required to use a database from Java, we see that there are basically three tasks we need to accomplish. We have to:
  1. Connect to the database so we can send it our requests
  2. Compose and send those requests to the database
  3. Catch the results of our requests and do something with them

This module will focus on the first task. We will look at the fundamentals of our program's connection to a relational database. Your learning will be in the context of the case study you have been following in this course.

Brazil Hospital Project

Since the Brazil Hospital Project has decided to use Java and JDBC for accessing the data they will store in a database system, you must become familiar with the steps needed to use JDBC. As you consider the work involved, you realize that there are three basic steps to working with the database.
  1. First, you have to connect to it.
  2. Second, you have to compose a request or command and send it to the database.
  3. Finally, you have to catch and report the results returned from the database.

To begin, you must learn how to accomplish that first step.


3 steps - bookfront
3 steps - Bookfront

After completing this module, you will have the skills and knowledge to:
  1. Describe the different pieces of the JDBC specification
  2. Write JDBC URLs
  3. Define the three functions that JDBC drivers perform in the data request process
  4. Define the purpose of four basic JDBC drivers
  5. Use the JDBC DriverManager to connect to the DBMS
  6. Write a simple yet complete JDBC program
In the next lesson, you will learn about the JDBC's relationship to SQL as a database connectivity tool.