JDBC Statement Interface

java.sql.Statement is used for executing a static SQL statement and returning the results it produces. Statement interface has two subinterfaces- PreparedStatement– Stores a precompiled SQL statement which can then be used to execute this statement multiple times by passing different values for the parameters. CallableStatement– Used to execute SQL stored…

Continue reading

JDBC Driver Interface

java.sql.Driver interface in JDBC API is one interface that every Driver class has to implement compulsorily. Each driver should supply a class that implements the Driver interface. When you load/register a driver by any of the following ways, Driver class implementation is loaded. After the class is loaded it creates…

Continue reading

JDBC Connection Interface

Using Java Connection interface you can create a session with a specific database. SQL statements are executed and results are returned within the context of a connection. Connection interface in JDBC API resides in java.sql package. How to get Connection instance You can create Connection object using DriverManager.getConnection() method. Once…

Continue reading

JDBC DriverManager Class

java.sql.DriverManager class in JDBC API in Java is a utility class to manage a set of JDBC drivers. Before connection to DB and start any DB operation you will have to register the driver for that specific DB with the DriverManager class. Java DriverManager class methods Main task of the…

Continue reading

JDBC Driver Types

JDBC API in Java programming language provides a standard, universal way to connect to databases. It is the responsibility of different DB vendors to provide the implementation of the interfaces in JDBC API and that implementation by DB vendors is provided as JDBC drivers. Table of contents Types of JDBC…

Continue reading