Specifies a database name for a connection; it can be used instead of specifying the database name after the subprotocol.
If you use a subsubprotocol to specify the database (for example, memory for an in-memory database), include the subsubprotocol as part of the databaseName attribute specification. For example:
jdbc:derby:;databaseName=memory:myDB
If the database name is specified both in the URL (as a subname) and as an attribute, the database name set as the subname has priority. For example, the following database connection URL connects to toursDB:
jdbc:derby:toursDB;databaseName=flightsDB
Allowing the database name to be set as an attribute allows the getPropertyInfo method to return a list of choices for the database name based on the set of databases known to Derby. For more information, see java.sql.Driver.getPropertyInfo method.
You can combine this attribute with all other attributes.
jdbc:derby:;databaseName=newDB;create=true