3 Introduction to JDBC
3 Introduction to JDBC
Client Application -> Application Server -> JDBC Driver -> Database
JDBC Components
1. JDBC API
It provides various methods and interfaces for easy communication
with the database. It includes two key packages
• java.sql: This package, is the part of Java Standard Edition (Java SE) ,
which contains the core interfaces and classes for accessing and
processing data in relational databases. It also provides essential
functionalities like establishing connections, executing queries, and
handling result sets
Contd…
javax.sql: This package is the part of Java Enterprise Edition (Java EE) ,
which extends the capabilities of java.sql by offering additional
features like connection pooling, statement pooling, and data source
management.
2. JDBC Driver Manager
Driver manager is responsible for loading the correct database-
specific driver to establish a connection with the database. It manages
the available drivers and ensures the right one is used to process user
requests and interact with the database.
It also provides a standard to connect a database to a
client application.
3. JDBC Test Suite
It is used to test the operation(such as insertion, deletion, updating)
being performed by JDBC Drivers.
4. JDBC Drivers
JDBC drivers are client-side adapters (installed on the client machine,
not on the server) that convert requests from Java programs to a
protocol that the DBMS can understand.
There are 4 types of JDBC drivers: