Java JDBC: Introduction to Java DataBase Connectivity


In this article, we will learn and understand JDBC i.e.; Java DataBase Connectivity

 

JDBC (Java DataBase Connectivity)

JDBC Java DataBase Connectivity is a standard set of API (Application Programming Interface) is used to interact with different varieties of databases from Java application

 

1-Java-JDBC-interaction-with-database

 

These interactions could be,

  • Creating and closing connection with database
  • Creating and executing DDL queries i.e.; create, drop, alter
  • Creating and executing DML queries i.e.; insert, select, update and delete
  • Creating and executing DCL queries i.e.; grant and revoke access privileges
  • Invoking and executing stored procedure
  • Invoking and executing stored function

 

JDBC API are set of classes and interfaces which defines how to interact with database to

  • Establish a connection with database
  • Executing SQL (DDL and DML) and MySql (stored procedure and stored function) queries
  • Processing result set obtained as a result of executing SQL and MySql queries
  • Getting metadata about database and result set
  • Maintaining integrity of the database using JDBC transaction
  • Gracefully closing all open connection and other things

 

Following article will discuss about different JDBC Driver types

 

References:

https://docs.oracle.com/javase/tutorial/jdbc/basics/gettingstarted.html
https://docs.oracle.com/cd/E11882_01/java.112/e16548/overvw.htm#JJDBC28025
http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html
https://en.wikipedia.org/wiki/JDBC_driver

 

Read Also:

 

Happy Coding !!
Happy Learning !!

Java JDBC: Driver Types