160 likes | 465 Views
ODBC and JDBC. Object Database Connectivity (ODBC). ODBC: Object Database Connectivity Ability to connect to a multitude of data sources using a single API. Based on the Call Level Interface specified by the SQL Access Group. Object Database Connectivity (ODBC).
E N D
Object Database Connectivity (ODBC) • ODBC: Object Database Connectivity • Ability to connect to a multitude of data sources using a single API. • Based on the Call Level Interface specified by the SQL Access Group.
Object Database Connectivity (ODBC) • Using vendor-supplied drivers to translate the ODBC commands into something understood by the DBMS, a single application can connect and communicate with multiple databases using a single, common set of commands. • Example: Human Resources applications that pull employee data from three distinct DBMSs.
Java Database Connectivity (JDBC) • Uses the same underlying concept of ODBC, but offers the portability of the Java programming language. • 4 different kinds exist that depend on the JVM and third party software to different degrees.
JDBC Type 1: JDBC-ODBC Bridge • JDBC calls are translated into ODBC commands. • In this case, JDBC is a layer on top of ODBC. • Requires at least that ODBC binaries be installed on each machine where an app using this type of JDBC is installed.
JDBC Type 2: JDBC Layered over a Native API • Similar to the previous type in that binaries must be installed in addition to any apps that use this type of JDBC. • Native APIs are supplied by vendors for translating JDBC calls into a form understood by their proprietary DBMSs.
JDBC Type 3: Pure Java Driver for Database Middleware • All client-side code is written in pure Java that sends commands to a middleware program that translates them into a form understood the DBMS. • According to Oracle, the middleware offers the ability to connect to many different databases.
JDBC Type 4: Direct-to-Database Pure Java Driver • All code for the driver is written purely in Java. • JDBC calls are converted directly into a vendor's proprietary network protocol for communicating with their DBMS. • Allows client apps to communicate directly with their backend server.
JDBC/ODBC and Concerns for Mobile Computing • While it is possible to use ODBC/JDBC to communicate with a DBMS from your iPhone/Android/Windows Phone device, it is not recommended. • Why?: • Bandwidth issues. • Security-related issues. • Lack of processing power on the client-side.