One way to connect to a database is through the JDBC Driver Manager using the DriverManager.getConnection() method. This method specifies a string containing a connection URL. The following example shows using the JDBC Driver Manager to connect to Microsoft SQL Server.