0% found this document useful (0 votes)
50 views1 page

Understanding JDBC and Its Main Classes

The JDBC is used for Java applications to communicate with relational databases and provides standard classes for database connectivity. It includes the DriverManager class which manages database drivers and matches connection requests to the proper driver, the Driver class which handles communication with the database, the Connection interface for contacting the database, the Statement class which encapsulates SQL statements, and the ResultSet class which encapsulates query results.

Uploaded by

Faraz Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views1 page

Understanding JDBC and Its Main Classes

The JDBC is used for Java applications to communicate with relational databases and provides standard classes for database connectivity. It includes the DriverManager class which manages database drivers and matches connection requests to the proper driver, the Driver class which handles communication with the database, the Connection interface for contacting the database, the Statement class which encapsulates SQL statements, and the ResultSet class which encapsulates query results.

Uploaded by

Faraz Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

The JDBC is used whenever a Java application should communicate with a relational database

for which a JDBC driver exists. JDBC is part of the Java platform standard; all visible classes
used in the Java/database communication are placed in package java.sql.
Main JDBC classes:

DriverManager.

Manages a list of database drivers. Matches connection requests from


the java application with the proper database driver using communication subprotocol.
The first driver that recognizes a certain subprotocol under jdbc (such as odbc or
dbAnywhere/dbaw) will be used to establish a database Connection.
Driver. The database communications link, handling all communication with the
database. Normally, once the driver is loaded, the developer need not call it explicitly.
Connection. Interface with all methods for contacting a database
Statement. Encapsulates an SQL statement which is passed to the database to be parsed,
compiled, planned and executed.
ResultSet. The answer/result from a statement. A ResultSet is a fancy 2D list which
encapsulates all outgoing results from a given SQL query.

You might also like