~/ learn/ java-from-zero/ cards/ JDBC architecture: drivers, connections & the four core interfaces
1 of 3

Type a DriverManager.getConnection call

Type a DriverManager.getConnection call

Answer

Connection conn = DriverManager.getConnection( "jdbc:postgresql://localhost:5432/mydb", "alice", "s3cret");

The JDBC URL identifies the driver (postgresql), host, port, and database. DriverManager finds the matching Driver implementation from the jars on the classpath.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/bf4a596f-f0da-4a21-bcba-f2e1f61f1721/flashcard utf-8 LF