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

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 [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:

jdbc:odbc:wham

All standard database URLs should commence with the string jdbc.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact