It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes How JDBC API works? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How JDBC API works?" Watch "How JDBC API works?" New topic

How JDBC API works?

Santosh Jagtap

Joined: Sep 20, 2004
Posts: 23
Can anybody tell me Since all are interfaces in jdbc can we make objects of connection/ResultSet/Statement etc.. ?

kelly devon
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
why dont u try out the jdbc tutorial first? i promise u that it helps
a lot. it will help u learn how to use wat u asked. remember nothing is learnt when it is handed to u in a platter.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852


JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Forum Bartender

[Asking smart questions] [About Bear] [Books by Bear]
Caitlin Fourie

Joined: Oct 03, 2003
Posts: 3

Link above should read

Just a quick hint to Santy:
Take a look at the classes contained in the driver package you use to connect to your database (for example: com.jdbc.mysql in the mysql_3.0.14.jar for MySQL database). The driver class you specify in Class.forName("com.jdbc.mysql.Driver") will register your specific driver. The DriverManager.getConnection(url) then asks for a Connection from all the registered drivers. If the DriverManager finds a driver which can connect to the url you have specified, the returned Connection will then point to all the implemented classes such as Statement which are specific to your database. Therefore you do not have to handle the implementation yourself. If you can, get hold of the source code for your driver or decompile the driver class files with a tool like JAD ( This will give you a good idea of how a database vendor has implemented the standard jdbc interfaces. The mysql driver's source & binary is available at:

Hope this helps
Santosh Jagtap

Joined: Sep 20, 2004
Posts: 23
Hi Morag,
Thank you for giving such a good explanation now i got some idea about jdbc api.Thnks Again
I agree. Here's the link:
subject: How JDBC API works?
It's not a secret anymore!