Skip to content
Chaance Graves edited this page Jan 29, 2016 · 12 revisions

Java Database Connectivity

What is JDBC and why should we use it?

To start of the tutorial, JDBC, which stands for Java Database Connectivity, is a standard Java API for database-independent connectivity between Java and a wide range of databases. For our purposes, we will be utilizing JDBC with connectivity to SQL.

Pre-Requisites for JDBC

In order to use JDBC effectively, you must have the following installed:

JDBC Architecture

The JDBC API uses a driver manager and database-specific drivers to provide transparent connectivity to heterogeneous databases. What the device manager does is ensure that the correct driver is used to access each data source. Below is a hierarchy of the architectural diagram show at the high level the Java application all the way to drivers and the specific databases (Figure 1).

Architectural design of JDBC

** Common JDBC Components **

  • DriverManager:
  • DriverManager:
  • DriverManager:

JDBC Sample Code

Clone this wiki locally