What is a database URL?

Lennart Jorelid

A database URL (or JDBC URL) is a platform independent way of adressing a database. A database/JDBC URL is of the form


If you are accessing a database called wham on the server yoghurt.jguru.com using the xyz subprotocol, your database URL could be:


Notice that the ordinary URL is of the form [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.

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 jdbc.