For applications with embedded databases, the syntax of the database connection URL is as follows.
jdbc:derby:[subsubprotocol:][databaseName][;attributes]*
This syntax has the following components.
In JDBC terminology, derby is the subprotocol for connecting to a Derby database. The subprotocol is always derby and does not vary.
subsubprotocol specifies where Derby looks for a database: in a directory, in memory, in a classpath, or in a jar file. subsubprotocol is one of the following:
jar requires an additional element immediately before the database name:
(pathToArchive)
pathToArchive is the path name of the jar or zip file that holds the database.
Specify the databaseName to connect to an existing database or a new one.
The databaseName value can be either an absolute path name or a path name relative to the system directory. For example, thisDB, databases/thisDB, and c:/databases/2014/january/thisDB can all be valid values. See "Connecting to databases" and its subsections in the Derby Developer's Guide. The path separator in the connection URL is a forward slash (/), even in Windows path names. The databaseName value cannot contain a colon (:), except for the colon after the drive name in a Windows path name.
Specify zero or more database connection URL attributes as detailed in Attributes of the Derby database connection URL.