JDBC URLs

A Uniform Resource Locator (URL) provides a standard way of locating a resource on the Internet. It's very much like an address. The first part of an URL specifies the protocol used. The rest of the URL gives information for locating the resource using the protocol mentioned at the beginning of the URL.

A JDBC URL is a way to specify a database so that the application or applet will use it to make the connection. JDBC driver vendors have some flexibility when establishing what the URL format will be for their driver. Of course, there are standards that must be followed to some extent. The standard format of a JDBC URL looks like this:

jdbc:<subprotocol>:<subname>

Notice that a colon must separate each section. The protocol for a JDBC ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.