Monday, 27 March 2017

Java Database Connectivity

Java Database Connectivity

Java JDBC is a java API to connect and execute query with the database. JDBC API uses jdbc drivers to connect with the database.

Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which allows to connect and execute query with the database. JDBC is a part of the Java Standard Edition platform. JDBC provides methods to query and update data in a database, and is oriented towards relational databases.

The JDBC classes are contained in the Java package java.sql and javax.sql.

The latest version is JDBC 4.2, and is included in Java SE 8.

JDBC allows multiple implementations to exist and be used by the same application. The API provides a mechanism for dynamically loading the correct Java packages and registering them with the JDBC Driver Manager. The Driver Manager is used as a connection factory for creating JDBC connections.

JDBC connections support creating and executing statements. These are SQL's CREATE, INSERT, UPDATE and DELETE statements, or they may be SELECT statement to query the database.
Also we can execute the stored procedures available in the database through a JDBC connection.
In order to execute queries in databases JDBC uses statements using one of the following interfaces:

·         Statement – the statement is sent to the database server each and every time.
·         PreparedStatement – the statement is cached and then the execution path is pre-determined on the database server allowing it to be executed multiple times in an efficient manner.
·         CallableStatement – used for executing stored procedures on the database.

SELECT Query statements return a JDBC row result set. The row result set is used to iterate over the result set. Individual columns in a row are retrieved either by name or by column number. There may be any number of rows in the result set.

Update statements such as INSERT, UPDATE and DELETE return an update count that indicates how many rows were affected in the database.

Java Database Connectivity


  1. Your blog is the best place to gain knowledge on Java programming. Keep following my profile for IT trainings and languages studies.
    Best JAVA Training in Chennai
    JAVA Training

  2. As technology grows, we have to be updated in our domain to sustain in the IT industry. Your post made me impressed in the way of your writing.
    Big Data Training in Chennai | Big Data Training

  3. Dot Net is an ever trending technology where it is more preferable by developers to utilize the features in the dot net language. Your article on Dot Net language proves that it is an evergreen technology in the IT market.
    dot net training institutes in chennai
    dotnet training in chennai


Related Posts Plugin for WordPress, Blogger...