JDBC Tutorial

JDBC program

Steps for developing a JDBC program:

  1. Loading the drivers.
  2. Obtain the connection or specify the URL.
  3. Pass the query.
  4. Process the result which is obtained from database.
  5. Close the connection.

JDBC is the standard specification released by SUN micro systems to develop the applications in database world. JDBC contains set of interfaces and these interfaces are implemented by various database vendors and server vendors.

A driver is nothing but a java class which acts as a middle layer between java program and database program. As on today all the drivers are developed by either database vendors or server vendors.

For example:

class x implements ___

Here, x is driver and ___ is JDBC interface.

In database world, each and every database vendor has developed their drivers and released to the market in the form of jar files.