*
The moose likes Beginning Java and the fly likes Doubt regarding java.sql.Connection and java.sql.Statement interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Doubt regarding java.sql.Connection and java.sql.Statement interfaces" Watch "Doubt regarding java.sql.Connection and java.sql.Statement interfaces" New topic
Author

Doubt regarding java.sql.Connection and java.sql.Statement interfaces

Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Hi

These 2 interfaces in the java.sql.* package provide us with methods to create a connection with a db and execute SQL statements respectively. But we know that the methods in an interface do not have any implementations. My question is where and how are these methods (like execute(boolean String sql)) implemented. We are using them to perform DB operations alright. But where is the concrete implementations of the methods of these interfaces?


~ Mansukh
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
In the database driver.

There are different drivers for the databases: zero, one or more for every database.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

go through Ernest's reply in this (<= click) discussion . hope that will clear your doubt
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Seetharaman Venkatasamy wrote:go through Ernest's reply in this (<= click) discussion . hope that will clear your doubt


Yes, I read that. Thanks..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doubt regarding java.sql.Connection and java.sql.Statement interfaces