
August 24th, 2006, 06:35 AM
|
|
Contributing User
|
|
Join Date: Oct 2002
Location: India
Posts: 64
Time spent in forums: 10 h 44 m 17 sec
Reputation Power: 6
|
|
|
Connection to DB :: Conceptual Issue
Hi,
When we connect to a DB using JDBC api (classe's in java.sql.*), connection is an interface, statement is an interface and so is ResultSet. The only concrete class here is DriverManager that actually seems to have an implementation.
My understanding of this strcuture is that appropriate methods are called depending on the DB which we are trying to connect to and thats the primary reason why all those strcutures were defined as interfaces in the first place. Am i right? Can someone throw more light into this?
I know how to code this, i just need an insight behind the motivation of such a design.
thanks
|