Wednesday, August 7, 2013

What is the purpose of JDBC Driver ?

What is the purpose of driver ?
-------------------------------------

Driver knows how to talk to DB.For every database, there will be
a jar file which knows how to connect to that particular database.

So JDBC calls classes in jar file(ojdbc6 or mysql jar) and classes in jar file will
communicate to that particular database.

If you want to connect to oracle, you need to have ojdbc.jar which knows
how to talk to Oracle Database.

If you want to connect to mysql, you need to have mysqlXXX.jar which knows
how to talk to Mysql Database.

Your JDBC code calls classes in driver jar,classes in driver jar knows how to
communicate with Oracle database and they execute our jdbc statements
on database.

Please let me know your feedback/Suggestins

No comments:

Post a Comment