Appendix B. JDBC database connection URLs for databases with development support
You can use a JDBC database connection URL to connect to a relational database. Each database has its own format of the database URL that contains information about the database itself and other configuration properties.
The following examples show you JDBC database connection URLs for databases with development support. For more information about development support, see the Development Support Scope of Coverage page.
B.1. Derby database URL example Copy linkLink copied to clipboard!
Derby is an embedded database that can run as a server, based on a file, or live in memory.
Configuration options
jdbc:derby:[//serverName[:portNumber]/][memory:]databaseName[;property=value[;property=value]]
jdbc:derby:[//serverName[:portNumber]/][memory:]databaseName[;property=value[;property=value]]
Example
jdbc:derby://localhost:1527/myDB, jdbc:derby:memory:myDB;create=true
jdbc:derby://localhost:1527/myDB, jdbc:derby:memory:myDB;create=true
B.2. H2 database URL example Copy linkLink copied to clipboard!
H2 is an embedded database that can run as a server, based on a file, or live completely in memory.
Configuration options
jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value…]
jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value…]
Example
jdbc:h2:tcp://localhost/~/test, jdbc:h2:mem:myDB
jdbc:h2:tcp://localhost/~/test, jdbc:h2:mem:myDB
Revised on 2021-04-19 12:03:09 UTC