You are on page 1of 11

JDB

C
 The Java Database Connectivity (JDBC) API enables you to
send SQL statements to any type of relational database from a
Java application.

 The JDBC API provides classes and interfaces that can be used
to write database applications in 100% Pure Java.

 Using the JDBC API, you can write one Java application to send
SQL statements to any type of database at run time.

 JDBC is secure and portable across any kind of Java platform.

 JDBC allows you to


• connect to a database
• execute SQL statements
• process the results of SQL queries

Covansys (India) Private Limited - Competency Development Centre


JDB
C
 The JDBC API provides support for both two-tier
and three-tier database access models.

 In the two-tier model the Java application client


has direct communication with the database.

 A JDBC driver sits on the client machine.

 However, the database itself probably resides on


another machine - the server.

 The JDBC driver communicates with the target


database.

 SQL statements are issued to this database.

 And the user receives the appropriate results.

 Communication between the application (client)


and the database (server) can take place over an
intranet or the Internet.

 Communication between the application and the


database is based on a DBMS-proprietary
protocol.

Covansys (India) Private Limited - Competency Development Centre


JDB
C
The middle tier receives the SQL statements
issued from the client application.

This tier forwards these statements to the


database.

The database processes the statements and sends


them back to the user through the middle tier.

The client machine communicates with the middle


tier using such protocols as Hypertext
Transfer Protocol (HTTP) or Remote Method
Invocation (RMI).

Whereas the middle tier and database


communication are governed by a DBMS-
proprietary protocol.

Covansys (India) Private Limited - Competency Development Centre


JDB
C

Covansys (India) Private Limited - Competency Development Centre


Introducing
Classes

Covansys (India) Private Limited - Competency Development Centre


JDB
C

Covansys (India) Private Limited - Competency Development Centre


JDB
C

Covansys (India) Private Limited - Competency Development Centre


A Closer Look at Methods and
Classes

Covansys (India) Private Limited - Competency Development Centre


JDB
C

Covansys (India) Private Limited - Competency Development Centre


A Closer Look at Methods and
Classes

Covansys (India) Private Limited - Competency Development Centre


Inheritanc
e

Covansys (India) Private Limited - Competency Development Centre

You might also like