Definition of JDBC
Definition of JDBC
Description:
1. Application: It is a java applet or a servlet that communicates with a data
source.
2. The JDBC API: The JDBC API allows Java programs to execute SQL
statements and retrieve results. Some of the important classes and
interfaces defined in JDBC API are as follows:
3. DriverManager: It plays an important role in the JDBC architecture. It
uses some database-specific drivers to effectively connect enterprise
applications to databases.
4. JDBC drivers: To communicate with a data source through JDBC, you
need a JDBC driver that intelligently communicates with the respective
data source.
Types of JDBC Architecture(2-tier and 3-tier)
The JDBC architecture consists of two-tier and three-tier processing models to
access a database. They are as described below:
1. Two-tier model: A java application communicates directly to the data
source. The JDBC driver enables the communication between the
application and the data source. When a user sends a query to the data
source, the answers for those queries are sent back to the user in the
form of results.
The data source can be located on a different machine on a network to
which a user is connected. This is known as a client/server
configuration, where the user’s machine acts as a client, and the
machine has the data source running acts as the server.