ics321-20091008-dbapp2

ics321-20091008-dbapp2 - ICS 321 Fall 2009 ODBC, JDBC &...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ICS 321 Fall 2009 Asst. Prof. Lipyeow Lim University of Hawaii at Manoa 10/8/2009 1 Lipyeow Lim -- University of Hawaii at Manoa
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alternative to Embedded SQL What if we want to compile an application without the need for a DBMS-specific pre-compiler ? Use a library of database calls Standardized (non-DBMS-specific) API Pass SQL-strings from host language and presents result sets in a language friendly way Eg. ODBC for C/C++ and JDBC for Java DBMS-neutral A driver traps the calls and translates them into DBMS-specific code 10/8/2009 Lipyeow Lim -- University of Hawaii at Manoa 2 Application DBMS-speciic Driver ODBC/JDBC API DBMS network
Background image of page 2
ODBC/JDBC Architecture Application Initiates connections Submits SQL statements Terminates connections Driver Manager Loads the right JDBC driver Driver Connects to the data source, Transmit requests, Returns results and error codes Data Source DBMS 10/8/2009 Lipyeow Lim -- University of Hawaii at Manoa 3 Application Driver Manager Driver Data Source
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Type I: Bridge Translate SQL commands to non-native API eg. JDBC-ODBC bridge. JDBC is translated to ODBC to access an ODBC compliant data source. Type II: Direct Translation to native API via non-Java driver Translates SQL to native API of data source. Needs DBMS-specific library on each client. Type III: Network bridge SQL stmts sent a middleware server that talks to the data source. Hence small JDBC driver at each client Type IV: Direct Translation to native API via Java driver Converts JDBC calls to network protocol used by DBMS. Needs DBMS-specific Java driver at each client.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 16

ics321-20091008-dbapp2 - ICS 321 Fall 2009 ODBC, JDBC &...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online