Download Remaining topics in JDBC

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft SQL Server wikipedia , lookup

Oracle Database wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Microsoft Access wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Relational model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

ContactPoint wikipedia , lookup

Versant Object Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Transcript
REMAINING TOPICS IN JDBC
Sagun Dhakhwa
OVERVIEW
Introduction to JDBC API
 Types of JDBC Drivers
 Introduction to ODBC

INTRODUCTION TO JDBC API



The Java Database Connectivity (JDBC)
The Java Database Connectivity (JDBC) API is the
industry standard for database-independent
connectivity between the Java programming language
and a wide range of databases –SQL databases and
other tabular data sources, such as spreadsheets or
flat files. The JDBC API provides a call-level API for
SQL-based database access.
JDBC technology allows you to use the Java
programming language to exploit "Write Once, Run
Anywhere" capabilities for applications that require
access to enterprise data. With a JDBC technologyenabled driver, you can connect all corporate data
even in a heterogeneous environment.
INTRODUCTION TO JDBC API


Java database connectivity (JDBC) is the
JavaSoft specification of a standard application
programming interface (API) that allows Java
programs to access database management
systems. The JDBC API consists of a set of
interfaces and classes written in the Java
programming language.
Using these standard interfaces and classes,
programmers can write applications that connect
to databases, send queries written in structured
query language (SQL), and process the results.
TYPES OF JDBC DRIVERS


The JDBC API defines the Java interfaces and
classes that programmers use to connect to
databases and send queries. A JDBC driver
implements these interfaces and classes for a
particular DBMS vendor.
A Java program that uses the JDBC API loads
the specified driver for a particular DBMS before
it actually connects to a database. The JDBC
DriverManager class then sends all JDBC API
calls to the loaded driver.
THE FOUR TYPES OF JDBC DRIVERS ARE:


JDBC-ODBC bridge plus ODBC driver, also
called Type 1. Translates JDBC API calls into
Microsoft Open Database Connectivity (ODBC)
calls that are then passed to the ODBC driver.
The ODBC binary code must be loaded on every
client computer that uses this type of driver.
Native-API, partly Java driver, also called Type
2. Converts JDBC API calls into DBMS-specific
client API calls. Like the bridge driver, this type
of driver requires that some binary code be
loaded on each client computer.
JDBC-Net, pure Java driver, also called Type 3.
Sends JDBC API calls to a middle-tier net server
that translates the calls into the DBMS-specific
network protocol. The translated calls are then
sent to a particular DBMS.
 Native-protocol, pure Java driver, also called
Type 4. Converts JDBC API calls directly into the
DBMS-specific network protocol without a middle
tier. This allows the client applications to connect
directly to the database server.

INTRODUCTION TO ODBC


The Microsoft Open Database Connectivity (ODBC)
interface is a C programming language interface that
makes it possible for applications to access data from
a variety of database management systems (DBMSs).
ODBC is a low-level, high-performance interface that
is designed specifically for relational data stores.
The ODBC interface allows maximum
interoperability—an application can access data in
diverse DBMSs through a single interface. Moreover,
that application will be independent of any DBMS
from which it accesses data. Users of the application
can add software components called drivers, which
interface between an application and a specific
DBMS.
JDBC ODBC BRIDGE

A JDBC-ODBC bridge consists of a JDBC driver
which employs an ODBC driver to connect to a
target database. This driver translates JDBC
method calls into ODBC function calls.
Programmers usually use such a bridge when a
particular database lacks a JDBC driver.
ODBC-JDBC

BRIDGES
An ODBC-JDBC bridge consists of an ODBC
driver which uses the services of a JDBC driver
to connect to a database. This driver translates
ODBC function-calls into JDBC method-calls.
Programmers usually use such a bridge when
they lack an ODBC driver for a particular
database but have access to a JDBC driver.
REFERENCES
http://publib.boulder.ibm.com/infocenter/rbhelp/v
6r3/index.jsp?topic=%2Fcom.ibm.redbrick.doc6.3
%2Fciacg%2Fciacg33.htm
 http://www.oracle.com/technetwork/java/overview
-141217.html
 http://msdn.microsoft.com/enus/library/windows/desktop/ms710252%28v=vs.8
5%29.aspx
 http://en.wikipedia.org/wiki/ODBC#ODBC_Drive
r_Manager
