Home Java Tutorial Introduction to JDBC

Introduction to JDBC

by anupmaurya
3 minutes read

In this article, you’ll learn about basics of JDBC such as What is JDBC, Need of JDBC , JDBC Drivers and Applications of JDBC.

What is JDBC?

  • JDBC stands for Java DataBase Connectivity.
  • The way every Java application connects to a database is through the JDBC API.
  • The JDBC API defines interface and classes for writing database application in Java by making database connections.

Need of JDBC

It is important to understand why we need Java Database connectivity. Java applications are required to connect with databases. Java applications are written in Java programming language, but the database only understands Structured Query Language (SQL). In order to establish a connection between Java application and database, JDBC is used. JDBC contains a set of interfaces and classes which helps to connect Java applications to the database.

JDBC Drivers

As we have understood, JDBC is used to connect Java applications with the database. We should also know that JDBC uses different JDBC drivers to perform this task. Basically, a JDBC driver is a software component which enables Java applications to interact with the database.

  • The driver handles the communication with the database server (like Oracle, MySQL).
  • You will interact directly with the Driver object very rarely.
  • Instead, you use Driver Manager objects, which manages objects, which manages objects of this type.
  • It also abstracts the details associated with the working of Driver Objects.

Applications of JDBC

JDBC is a specification that provides a complete set of interfaces that allows for portable access to an underlying database. Java can be used to write different types of executables, such as

  • Java Applications
  • Java Applets
  • Java Servlets
  • Java ServerPages (JSPs)
  • Enterprise JavaBeans (EJBs).

You may also like

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.