JDBC

JDBC

Java Database Connectivity, is an application programming interface that allows applications built in the Java programming language to interact with the database. SQL queries can be sent to almost all relational database management systems with JDBC. It is a structure connected to any database with JDBC and access data with SQL commands. 

 

JDBC can be written independently of the program and used in the different programs. 

JDBC steps :

 

1. The JDBC Driver is installed. 

2. Database connection is created with the getConnection method from the DriverManager class. 

3. The classes that implement the Statement, PreparedStatement, CallableStatement interfaces used to send queries to the Class database are returned. 

4. Resultset is created. 

5. After the database operations are finished, the connectivity /statement/resultset is closed with the close method.

 

Maven

POM
Dependency management
Maven repository
Maven infrastructure


JDBC Built-In Classes

getConnection
createStatement
execute
executeQuery
executeBatch
executeUpdate
Next
getString
getColumnCount

Share The Post