![]() | ![]() |
Home |
|
|
jConnect for JDBC Programmer's Reference |
|
| Chapter 1 Introduction |
Chapter 1
This chapter introduces you to jConnect for JDBC and describes its concepts and components.
JDBC (Java Database Connectivity) from the Java Software Division of Sun MicroSystems, Inc. is a specification for an application program interface (API) that allows Java applications to access multiple database management systems using Structured Query Language (SQL). The JDBC driver manager handles multiple drivers that connect to different databases.
A set of interfaces is included in the standard JDBC API so you can open connections to databases, execute SQL commands, and process results. The interfaces are described in Table 1-1.
Interface | Description |
java.sql.Driver | Locates the driver for a database URL |
java.sql.Connection | Connection to a specific database |
java.sql.Statement | Executes SQL statements |
java.sql.PreparedStatement | Handles parameterized SQL statements |
java.sql.CallableStatement | Handles database stored procedure calls |
java.sql.ResultSet | Gets the results of SQL statements |
java.sql.DatabaseMetaData | Used to access a variety of information about a connection's DBMS and database |
java.sql.ResultSetMetaData | Used to access a variety of information describing a ResultSet's attributes |
Each relational database management system requires a driver to implement these interfaces. All JDBC calls are sent to the JDBC driver manager, which passes the call to the specified driver.
There are four types of JDBC drivers:
Type 1 JDBC-ODBC bridge - translates JDBC calls into ODBC calls and passes them to an ODBC driver. Some ODBC software must be resident on the client machine. Some client database code may also reside on the client machine.
Type 2 native-API partly-Java driver - converts JDBC calls into database-specific calls. This driver, which communicates directly with the database server, also requires some binary code on the client machine.
Type 3 net-protocol all-Java driver - communicates to a middle-tier server using a DBMS-independent net protocol. A middle-tier gateway then converts the request to a vendor-specific protocol.
Type 4 native-protocol all-Java driver - converts JDBC calls to the vendor-specific DBMS protocol, allowing client applications direct communication with the database server.
jConnect is Sybase's high-performance JDBC driver. jConnect is both:
A net-protocol/all-Java driver within a three-tier environment, and
A native-protocol/all-Java driver within a two-tier environment.
The protocol used by jConnect is TDS 5.0 (Tabular Data Stream(TM), version 5), the native protocol for Adaptive ServerŪ and Open Server(TM) applications. jConnect implements the JDBC standard to provide optimal connectivity to the complete family of Sybase products, allowing access to over 25 enterprise and legacy systems, including:
Adaptive Server Enterprise
Adaptive Server Anywhere
Adaptive Server IQ (formerly Sybase IQ(TM))
Replication ServerŪ
OmniConnect(TM)
Since changing the name of Sybase SQL Server(TM) to Adaptive Server Enterprise, Sybase may use the names Adaptive Server and Adaptive Server Enterprise to refer collectively to all supported versions of Sybase SQL Server and Adaptive Server Enterprise. From this point forward, in this document, Adaptive Server Enterprise will be referred to as Adaptive Server.
In addition, jConnect for JDBC can access Oracle, AS/400, and other data sources using Sybase DirectConnect(TM).
In some instances, jConnect's implementation of JDBC deviates from the JDBC 1.x or 2.x specifications. For more information, see "Restrictions on and interpretations of JDBC standards".
|
|