What is a database URL?
Created May 4, 2012
jdbc:[subprotocol]:[node]/[databaseName]
If you are accessing a database called wham
on the server yoghurt.jguru.com
using the xyz
subprotocol, your database URL could be:
jdbc:xyz:yoghurt.jguru.com/wham
Notice that the ordinary URL is of the form
If the database resides on the same computer node as the java program, the hostname part and the corresponding double slashes of the jdbc can be skipped:
All standard database URLs should commence with the string
[protocol]://[node]/[path]
, such as http://www.jguru.com/index.html
. The jdbc database URL mimics the ordinary URL, just adding a subprotocol, and - depending on the driver implementation - omitting the double slashes.
jdbc:odbc:wham
jdbc
.