my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes jdbc api have interfaces 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 "jdbc api have interfaces" Watch "jdbc api have interfaces" New topic

jdbc api have interfaces

varma kothapalli

Joined: Jan 12, 2005
Posts: 2
In jdbc api, most of the things defined are interfaces and not classes. Why most of them are interfaces?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32793

Welcome to JavaRanch!

JDBC uses interfaces because it only provides a contract for the classes. The actually implementation is provided by the JDBC driver. For example, if you use Oracle, you have a driver in the file. This file contains all of Oracle's custom classes that implement the JDBC interfaces.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
varma kothapalli

Joined: Jan 12, 2005
Posts: 2
Thank you
I agree. Here's the link:
subject: jdbc api have interfaces
It's not a secret anymore!