Derby JDBC database connection URL A Java application using the JDBC API establishes a connection to a database by obtaining a Connection object. Database connection URLdescription Database connection URLfeatures common to embedded and client/server versions

The standard way to obtain a Connection object is to call the method DriverManager.getConnection, which takes a String containing a connection URL (uniform resource locator). A JDBC connection URL provides a way of identifying a database. It also allows you to perform a number of high-level tasks, such as creating a database or shutting down the system.

The following example shows the use of the connection URL:

Connection conn = DriverManager.getConnection("jdbc:derby:sample");

An application in an embedded environment uses a different connection URL from that used by applications using the Network Server in a client/server environment. See "Accessing the Network Server by using the network client driver" in the for more information.

However, all versions of the connection URL (which you can use for tasks besides connecting to a database) have common features:

For more information about what you can specify with the connection URL, see . For details on the connection URL syntax, see "Syntax of database connection URLs for applications with embedded databases" in the . For detailed reference information on connection URL attributes and values, see "Setting attributes for the database connection URL" in the .