What is JDBC and what are its main components?

1 Answers
Answered by suresh

What is JDBC and what are its main components?

JDBC stands for Java Database Connectivity, it is a Java API that allows Java applications to interact with databases. The main components of JDBC are:

  1. Driver Manager: It manages the connection between Java application and the database.
  2. Driver: It is a software component that enables Java application to interact with a specific type of database.
  3. Connection: It represents a connection with the database and allows executing SQL queries.
  4. Statement: It is used to execute SQL queries against the database.
  5. ResultSet: It represents the result of a SQL query and allows fetching data from the database.

These components play a crucial role in enabling Java applications to communicate with databases and perform various operations such as querying, updating, and deleting data.

Answer for Question: What is JDBC and what are its main components?