Differences between revisions 3 and 4
Revision 3 as of 2006-02-09 23:55:46
Size: 1495
Editor: adsl-71-141-224-12
Revision 4 as of 2009-09-20 22:11:21
Size: 1495
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Specifying the Database Name in a JDBC Connection URL

Database names in Derby are more than a single word, they are URL like in that they can include the URL path separator character forward slash '/'.

Database Names are either relative or absolute

An absolute path corresponds to an absolute path on your file system:

  • jdbc:derby:/home/fred/databases/projects/cdcollection

means the top level folder for the database is:

  • /home/fred/databases/projects/cdcollection

A JDBC connection URL of:

  • jdbc:derby:d:/home/2006/accounts

means the top level folder for the database is:

  • d:\home\2006\accounts

A relative path is relative to the value of the system property derby.system.home if it is set, otherwise relative the current working directory of the java virtual machine.

All these examples are different ways to connect to the cdcollection database described above, examples on windows would be similar, including use of the forward slash.



  current working directory = /home/fred

  current working directory = /home/fred/databases/projects

This wiki entry is originally from a post by Dan Debrunner on the derby-users mailing list on February 1, 2006.

DatabaseNamesRelativeAbsolute (last edited 2009-09-20 22:11:21 by localhost)