Java Database Connectivity

In Java, Java Database Connectivity is used to connect java application to database. Using Java Database API (JDBC) you can connect your java application to database.

JDBC Connection

Why use JDBC

JDBC used because before JDBC, ODBC API was the database API to connect and execute query with the database.

But, ODBC API uses ODBC driver which is written in C language (i.e. platform dependent and unsecured).

That is why Java has defined its own API (JDBC API) that uses JDBC drivers (written in Java language).