Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL (Structured Query Language) X/OPEN Call Level Interface For SQL ODBC (Open DataBase Connectivity) API JDBC (Java DataBase Connectivity) API SQL (Structured.

Similar presentations


Presentation on theme: "SQL (Structured Query Language) X/OPEN Call Level Interface For SQL ODBC (Open DataBase Connectivity) API JDBC (Java DataBase Connectivity) API SQL (Structured."— Presentation transcript:

1 SQL (Structured Query Language) X/OPEN Call Level Interface For SQL ODBC (Open DataBase Connectivity) API JDBC (Java DataBase Connectivity) API SQL (Structured Query Language) SQL89, SQL92, SQL3 X/OPEN Call Level Interface ODBC APIJDBC API JDBC-ODBC Bridge

2 Application GUI Network Interface JDBC API Database Server Client SQL Requests SQL Results SQL Requests Network Connection JDBC API defines a set of interfaces and classes to be used for communicating with a database.

3 Application Network Interface JDBC Driver Database Server Client SQL Requests SQL Results SQL Requests Network Connection JDBC Driver: translates java into SQL. JDBC drivers are implemented by database vendors. JDBC supports the ANSI SQL92 Entry Level standard. Database Libraries

4 JDBC supports: ANSI SQL92 Entry Level Standard Improvements of SQL89 meta-data DDL statements Vendor independent syntax for using stored procedures scalar functions outer joins Note: Since no syntax checking is performed by JDBC, it is possible to execute any SQL statements at the expense of portability.

5 Trusted Applications: Any stand-alone applications that are stored in local drives and have access to local resources. Downloaded applets are untrusted applications. They cannot write to local files, open arbitrary network connections, or even read environment variables. One way to make applets trusted is by code signing. JDBC applets are restricted from opening network connections to any host other than the one in which they are downloaded.

6 Guideline for security: Never allow untrusted applets direct access to your database. User should be required to provide credentials for every connection made. User credentials should not come from a local source such as a current login ID. All drivers should be tested and approved as JDBC COMPLIANT.

7 Components of JDBC: The java.sql package The test suite The JDBC-ODBC bridge What you need to develop programs in JDBC API? 1.A SQL92 compliant database. 2.A JDBC driver for your database. 3.The java Development Toolkit version 1.1 (JDK 1.1)

8 JDBC Driver Types: Driver TypeDescription 1. ODBC-JDBC BridgeMap JDBC calls to ODBC driver calls on the client. 2. Native API-Part JavaMaps JDBC calls to native calls on the client. 3. JDBC Network-All JavaMaps JDBC calls to network protocol, which calls native methods on server. 4. Native Protocol-All JavaDirectly calls RDBMS from the client machine.

9 Application JDBC Driver Database Client SQL Requests SQL Results Stand-Alone Applications run on Local Machine JDBC Driver: translates java calls into ODBC calls. Harder to debug, slower, not work for applets. Inexpensive, readily available. ODBC Driver Type I: JDBC-ODBC Bridge Driver Network Interface Local Disk Proprietary Database Protocol Network Interface Server

10 Application JDBC Driver Database Client SQL Requests SQL Results JDBC Driver: use local libraries to communicate with database server. Java calls are translated into local CLI calls. Faster than the ODBC bridge, not work for applets. Native Database Libraries (Call Level Interface) Type II: Native-API-Partly Java Driver Network Interface Local Disk Proprietary Database Protocol Network Interface Server

11 Application Database Client SQL Requests SQL Results JDBC Driver: client calls are translated into driver-specific network protocol. JDBC Driver: server listenser translates the requests into CLI calls at server site. All database-specific code resides on the server. JDBC driver network protocol is not standardized. JDBC Driver (Client) Type III: JDBC-Net-All-Java Driver Network Interface Local Disk JDBC Driver Network Protocol Network Interface Server JDBC Driver (Server Listenser) Native Database Libraries (Call Level Interface)

12 Type III: JDBC-Net-All-Java Driver JDBC driver network protocol is not standardized. It implies that compatible client and server drivers from a specific vendor must be used. It can be used over internet.

13 Application Database Client SQL Requests SQL Results JDBC Driver: 100% java and use no CLI native libraries. Support applets containing the driver to be downloaded over the network, I.e., applets can communicate directly with the database. JDBC Driver Type IV: Native-Protocol-All-Java Driver Network Interface Local Disk Proprietary DB Protocol (in Java) Network Interface Server


Download ppt "SQL (Structured Query Language) X/OPEN Call Level Interface For SQL ODBC (Open DataBase Connectivity) API JDBC (Java DataBase Connectivity) API SQL (Structured."

Similar presentations


Ads by Google