0% found this document useful (0 votes)
184 views4 pages

Difference Between JDBC and ODBC

JDBC and ODBC are both APIs that allow applications to access databases. JDBC is specific to Java applications while ODBC works across languages. The key difference is that JDBC code is Java-specific and easier to understand, whereas ODBC code is more complex but works across platforms and languages.

Uploaded by

Kabanda Yves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views4 pages

Difference Between JDBC and ODBC

JDBC and ODBC are both APIs that allow applications to access databases. JDBC is specific to Java applications while ODBC works across languages. The key difference is that JDBC code is Java-specific and easier to understand, whereas ODBC code is more complex but works across platforms and languages.

Uploaded by

Kabanda Yves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Difference Between JDBC and ODBC

JDBC and
ODBC, both are the API (Application Programming Interface) that help the
applications on the client side to access the database on the server side. The
RDBMS vendors provide ODBC or JDBC drivers so that their database can be
accessed by the applications on client side. The point that fundamentally
differentiates JDBC and ODBC is that JDBC is language dependent and it is
Java specific whereas, the ODBC is a language independent. Let us see in
how many aspects the does JDBC and ODBC differs from each other with the
help of comparison chart shown below.

Content: JDBC Vs ODBC


1. Comparison Chart
2. Definition
3. Key Differences
4. Similarity
5. Conclusion

Comparison Chart
BASIS FOR
JDBC ODBC
COMPARISON

Basic JDBC is language and platform ODBC is language and

dependent (Java Specific). platform independent.

Full form Java Database Connectivity. Open Database Connectivity.

Code Code is easy to understand. Code is complex.

Definition of JDBC
Java Database Connectivity (JDBC) is an application programming
interface i.e. (API). JDBC was released as a part of Java development Kit
(JDK) 1.1. in the year 1996 by SUN Microsoft. It is built the basis of
ODBC and hence, some basics of ODBC retain in JDBC.

It is a standard interface between any Java application and different


databases. The function of JDBC is to help the Java-based application to
access different types of databases. JDBC provide methods to query
database, and it can also be used to update the database.  JDBC
provide JDBC driversthat converts the request from Java application on
client side to the language that database understands.

As JDBC is language and platform specific, Java application can use JDBC-


to-ODBC bridge to communicate with ODBC adaptable databases. Unlike
ODBC, JDBC has easy coding but, it is only limited to Java only.

Definition of ODBC
ODBC is Open Database Connectivity. Like JDBC, ODBC is also an API
that acts as an interface between an application on the client side and the
database on the server side. Microsoft introduced ODBC in the year 1992.
ODBC helps an application to access the data from the database. An
application written in any language can use ODBC to access different types
of databases and hence, it is said to be language and platform independent.
Like JDBC, ODBC aslo provides ODBC drivers that convert the request of
application written in any language into the language understandable by
databases.

ODBC is most widely used and understands many different programming


languages. But its code is complex and hard to understand.

Key Differences Between JDBC and ODBC

1. The most basic difference between JDBC and ODBC is that JDBC is
language and platform dependent. On the other hand, the ODBC is
language and platform independent.
2. Java Database Connectivity is an acronym for JDBC, and on the other
hand, Open Database Connectivity is an acronym for ODBC.
3. The code for ODBC is complex and is hard to learn. However, the code
for JDBC is simpler and easy to run.
Similarity:
Both are used by the client-side applications to access different kinds of
databases on server side.

Conclusion:
Both JDBC and ODBC are used from an application on the client side to
access different types of database on the server side. If you want to
platform and language independent then use ODBC else if you are working
on Java platform then use JDBC.
A database driver is a program for which implements a protocol (ODBC, JDBC) for connecting
to a database. It is an Adaptor which connects a generic interface to a specific vendors
implementation, just like printer drivers etc.

A database dialect is a configuration setting for platform independent software (JPA, Hibernate,
etc) which allows such software to translate its generic SQL statements into vendor specific
DDL, DML.

It appears that "database dialect" may be used by other types of database programs to mean
something slightly different but broadly similar to what I have just written. That is, "database
driver" is an acknowledged industry term with one single concrete meaning whereas "database
dialect" is not similarly recognised and so refers to different concepts in different contexts.

 OBDC is Microsoft drivers and uses dlls, JDBC is Java drivers and uses jar files.
 ODBC is procedural oriented and JDBC is object oriented.
 ODBC can't be directly used with Java because it uses a C interface.
 ODBC makes use of pointers which have been removed totally from Java.
 ODBC mixes simple and advanced features together and has complex options for   
simple queries. But JDBC is designed to keep things simple while allowing advanced
capabilities when required.
 ODBC requires manual installation of the ODBC driver manager and driver on all
client machines.
 JDBC drivers are written in java and JDBC code is automatically installable, secure,
and portable on all platforms.
 JDBC API is a natural Java Interface and is built on ODBC. JDBC retains some of the
basic feature of ODBC.
 JDBC is Java Database Connectivity. It enables java programs to execute SQL
statements. JDBC makes it possible to write a single database application that can run
on different platforms and interact with different DBMS.
 JDBC is language dependent i.e it is used only to make connectivity with java. ODBC
is open database connectivity. The goal of ODBC is to make it possible to access any
data from any application, regardless of which database management system (DBMS)
is handling the data so it is language independent.
 ODBC is language independent and JDBC is language dependent.

You might also like