Description: The standard way to access databases is in the file system by specifying the path to the database, either absolute or relative to the system directory. In a client/server environment, this path is always on the server machine.
Keywords: Databases, connecting to within system

# Connecting to databases within the system

The standard way to access databases is in the file system by specifying the path to the database, either absolute or relative to the system directory. In a client/server environment, this path is always on the server machine.

By default, you can connect to databases within the current system directory (see Defining the system directory). To connect to databases within the current system, just specify the database name on the connection URL. For example, if your system directory contains a database called myDB, you can connect to that database with the following connection URL:

    jdbc:derby:myDB

The full call within a Java program would be:

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

Parent topic: Connecting to databases
Related concepts
Conventions for specifying the database path
Special database access
Connecting to databases outside the system directory
Related reference
Database connection examples