java.sql.DriverManager.getConnection method A Java application that uses the JDBC API establishes a connection to a database by obtaining a Connection object. The standard way to obtain a Connection object is to call the method DriverManager.getConnection, which takes a String that contains a database connection URL. java.sql.DriverManager.getConnection method

A JDBC database connection URL (uniform resource locator) provides a way of identifying a database.

DriverManager.getConnection can take one argument besides a database connection URL, a Properties object. You can use the Properties object to set database connection URL attributes. If you specify any attributes both on the connection URL and in a Properties object, the attributes on the connection URL override the attributes in the Properties object.

SchemasAPP as defaultYou can also supply strings representing user names and passwords. When they are supplied, checks whether they are valid for the current system if user authentication is enabled. User names are passed to as authorization identifiers, which are used to determine whether the user is authorized for access to the database and for determining the default schema. When the connection is established, if no user is supplied, sets the default user to APP, which uses to name the default schema. If a user is supplied, the default schema is the same as the user name.