JDBC TUTORIAL

What is JDBC?
A JDBC driver is a software component enabling a Java application to interact with a database.It is a specification that tells vendor how to write a driver program to interface java program with their database. The JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database.
JDBC helps you to write Java applications that manage these three programming activities:
1.     Connect to a data source, like a database
2.     Send queries and update statements to the database
3.     Retrieve and process the results received from the database in answer to your query

What are we going to cover in this tutorial??
*JDBC Architecture                                               *Types Of JDBC Drivers
*Steps to connect to Database using JDBC         *JDBC Implementation program 
*JDBC Metadata                                                  *JDBC Statements with Example
*ResultSet Interface                                              *Connection and Transaction

JDBC Architecture
The JDBC API supports both two-tier and three-tier processing models for database
access.

                               Figure 1: Two-tier Architecture for Data Access.

In the two-tier model, a Java application talks directly to the data source. This requires a JDBC driver that can communicate with the particular data source being accessed. A user's commands are delivered to the database or other data source, and the results of those statements are sent back to the user. The data source may be located on another machine to which the user is connected via a network. This is referred to as a client/server configuration, with the user's machine as the client, and the machine housing the data source as the server.

                             Figure 2: Three-tier Architecture for Data Access.



In the three-tier model, commands are sent to a "middle tier" of services, which then sends the commands to the data source. The data source processes the commands and sends the results back to the middle tier, which then sends them to the user. MIS directors find the three-tier model very attractive because the middle tier makes it possible to maintain control over access and the kinds of updates that can be made to corporate data. Another advantage is that it simplifies the deployment of applications. Finally, in many cases, the three-tier architecture can provide performance advantages.

                                       Prev                               Next





Comments

Popular posts from this blog

Servlet Advantages and Disadvantages

The Deployment Descriptor: web.xml

Session Management