|
JDBC Driver Models
Java is a technology, which connected
to database through network
and forms Java Database Connection. JDBC supports two Driver models, they are
Ø Two
tier model
Ø Three
tier model
Two tier model
Two-tier model is a Java applet
applications interact directly with the database. This type of model is
referred to as client sever
configuration where user is the client and machine that has the database is
called as the server.
Three tier model
In this model middle tier is introduced, which is used for
various purpose, there are some of the function are used in middle tier, they
are
Ø Collection
of SQL statements from the client and handing it over to the database
Ø Receiving
results from the database to the client
Ø Maintaining
control over
accessing and updating of the data
SQL Conformance
Structured query language is the standard language used to
access relational databases. Unfortunately there are no standards set at
present for it. JDBC defines a set of generic SQL type identifiers in the class
Java.SQL.Types
Ways of dealing with SQL conformance
JDBC deals with some of the
performing SQL conformance, they are
Ø JDBC
API allows any query string to be passed through to an underlying DBMS driver.
But there are possibilities of getting an error on some DBMS.
Ø Provision
of ODBC style escape clauses.
Ø Provision
of descriptive information about the DBMS using an interface, Database Meta data.
Different Types of Driver Managers
JDBC contains three components: application, driver
manager and driver. The user application invokes JDBC methods to send SQL
statements to the database and retrieves result. JDBC driver manager is used to
connect java application to the correct JDBC driver. There are four types of
JDBC driver. They are
Ø The
JDBC-ODBC Bridge plus ODBC driver
Ø Native-API
partly-Java driver
Ø JDBC-Net
pure Java driver
Ø Native-Protocol pure
Java driver
|