This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes jdbc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc" Watch "jdbc" New topic
Author

jdbc

vinoth ar
Greenhorn

Joined: Jan 07, 2009
Posts: 21
i heard while reading... in jdbc that API will define interface and the driver has to implement that... what that exactly mean?? what is happening behind the scene... anyone explain in nice manner...'
thanks

vino


vino...
Omar Al Kababji
Ranch Hand

Joined: Jan 13, 2009
Posts: 357
Simply that its like saying "hey if you want to be a JDBC Driver you have to talk my language" and this is obtained by forcing the vendor to implement specific interfaces defined by SUN. the same is for the Servlets.


i will give you a simple example suppose i want to force someone to specify an XML definition of his object contents, at this point i would implement an interface such like this one



now anyone who wants to speak my language should implement this interface and provide a definition for the "toXML()" method, at this point i don't care what type of definition he did, i just know that his class implements my interface and so i can call the toXML() method from the objects created using his class. (polymorphisim)

hope i helped you ;)

(peace)

Omar Al Kababji - Electrical & Computer Engineer
[SCJP - 90% - Story] [SCWCD - 94% - Story] [SCBCD - 80% - Story] | My Blog
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Each DB has its own way of obtaining a connection and doing several actions on it. The JDBC API provides a contract how to interact with DB using Java. It's intented to be DB independent. Each DB manfacturer could write its own JDBC API implementation for it so that one only need to replace the JDBC implementation (the JDBC driver) when one would switch from DB. No changes in JDBC code are needed then.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

vinoth ar, please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

Using a title of "jdbc" in a forum completely dedicated to questions on JDBC isn't very helpful. This is the second topic you've started with this title. How are we to tell them apart? What if everyone named every topic in this forum "jdbc"?

Please go back and change your post to add a more meaningful subject by clicking the


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdbc
 
Similar Threads
interfaces
Enable SSL in weblogic8.1
precompilation
Store Data in a file in psv(pipe seperated value) format
The absolute uri: http://java.sun.com/jstl/core cannot be resolve