July 2005
Intermediate to advanced
1032 pages
27h 10m
English
Before you can connect to a database, you have to tell JDBC to which server you want to connect. JDBC uses a paradigm that you are undoubtedly already familiar with: A database is identified using a URL (Uniform Resource Locator). Every time you use your web browser, you use URLs.
A URL is composed of at least two parts, sometimes more. For example, the URL http://www.postgresql.org has two components. The http part specifies the protocol to use (in this case, hypertext transport protocol). Everything following the colon is used by the protocol to find the resource you want.
A JDBC URL is composed of three parts. We'll be using the URL jdbc:postgresql:movies in many of the examples for this chapter. ...
Read now
Unlock full access