The DriverManager class is used to open a connection to a database via a JDBC Driver, which must be registered with the DriverManager |
DriverManager chooses from a given listof available drivers to suit the explicit type of database connection |
DriverManager maps URL's to drivers |
URL syntax |
jdbc:<subprotocol>:<subname> |
e.g jdbc:msql:naos://naos.npac.syr.edu:2007//stuff |
The above syntax specifies the transport to use (jdbc), the database type (msql), the server name (naos), the port (2007), and the database to connect to (stuff). |