* GREY=local LOCAL HTML version of Foils prepared 13 March 1997

Foil 12 Connecting to a database

From Overview of Java Database Connection Basic Information Technology Course CPS616 -- Spring Semester 1997. by Udayan Parvate, Tom Pulikal (Geoffrey C. Fox) *

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:&#060subprotocol&#062:&#060subname&#062
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).



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 22 1997