Difference between JDBC and ODBC

(527 Views)


What is ODBC?

ODBC API Structure

ODBC stands for Open Database Connectivity API was used for communication between application and database.

ODBC API uses ODBC drivers to interact with the databases. ODBC drivers are completely written in C language. Therefore, they are platform dependent which leads to the portability issues. They are also unsecured which can lead to various security issues. That is reason Java has defined its own API � JDBC API which uses JDBC drivers, which are written completely in java language, to interact with the databases.

What is JDBC?

JDBC API Structure

JDBC stands for Java Database Connectivity API which is used by all Java Applications that want to interact with the database.

JDBC API makes Java Application relatively independent of what database it uses. If your application is using JDBC API to interact with the database, then you are not required to make many changes in your code each time you change the database of your application. You can switch effortlessly from one database to another database.

JDBC API uses JDBC driver of that database to interact with that database. Each Database have their own JDBC Driver which is supplied by JDBC vendor themselves. For example, JDBC driver of Oracle 11G is ojdbc6.jar and it is available in Oracle installation directory at �/Oracle/app/oracle/product/11.2.0/dbhome_1/jdbc/lib.

ODBC vs JDBC

ODBC vs JDBC Difference between
ODBCJDBC
ODBC stands for Open Database ConnectivityJDBC stands for Java Database Connectivity
ODBC is written in C language.JDBC is written in Java language.
ODBC can be used in language like C,C++,Java etc.JDBC can only be used with Java language.
ODBC is platform dependent.JDBC is platform independent.
ODBC is less securedJDBC is secured
ODBC requires manual installation of the ODBC driver manager and driver on all client machines.JDBC drivers do not require manual installation. They can be easily integrated in your java code.
ODBC makes use of pointers. Java Doesn't support Pointers. So JDBC doesn't use pointers
ODBC is procedural.JDBC is object oriented.

Solution Worked 6 UpvotesUpvote

        

Solution Didn't Worked 2 DownvotesDownvote



Comments



Search