JDBC  «Prev 

JDBC Sample Program Connections


You are learning about the DriverManager, widely used by business solution developers who use JDBC. Three classes are involved in making connections:
driver static graphic
1) java.sql.Driver: implemented by the database vendor and supplied to you. You only need to instantiate it. When a Driver class is loaded, it creates an instance of itself and registers with the DriverManager.

DriverManager static graphic
2) java.sql.DriverManager: The DriverManager class maintains a list of Driver implementations and when a request for a connection is made, it searches for one that can connect to the requested URL.

connection static graphic
3) java.sql.Connection: You would use this for sending one or more querying, performing transactions and obtaining database metadata.