wood burning stoves*
The moose likes JDBC and the fly likes DriverManager class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DriverManager class" Watch "DriverManager class" New topic
Author

DriverManager class

MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
I referred one URL http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/drivermanager.html#999674

In this, I read that DriverManager class handles establishing connection between a database and appropriate driver.
But what my intuition is, the connection is established between an application and database.

Correct me if I am wrong.


I am slow but sure
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

the connection is established between an application and database
Indeed. But by using the DriverClass, and othe jdbc classes, as the connection mechanism.

Your application asks the DriverClass to connect to the database.
The DriverClass establishes the connection to the database.
Your application uses that connection.


OCUP UML fundamental and ITIL foundation
youtube channel
MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
Thanks Jan
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: DriverManager class
 
Similar Threads
DriverManager class
Connecting to MS Access
why should dataSource be used instead of Device Manager
database url
Java Class Implementation Logic