Java – JDBC Driver list for all leading database

In this article, we will list down all drivers and URL formation for all leading databases

Q) How to get Connection object for interacting with Database ?

  • DriverManager class helps to get connection object using one of the overloaded static getConnection() methods
  • Using connection, user can create SQL statement and then execute SQL queries against database
DriverManager.getConnection(String dbURL); 
DriverManager.getConnection(String dbURL, Properties props); 
DriverManager.getConnection(String dbURL, String username, String password);

Q) How to load driver ?

  • Before getting connection object, appropriate driver needs to be loaded using either of the following methods,
  • There are 3 ways to create connection objects from overloaded static getConnection() methods available in the DriverManager class and all 3 requires database URL
  • Therefore, we will look into driver class name and their corresponding database URL formation in tabular form,

Database, driver and URL with example :

Relational Database
Driver Name
(qualified class name)

Database URL & Example


Eg: jdbc:mysql://localhost



Eg: jdbc:oracle:thin:@localhost

IBM DB2<databaseName>


Eg: jdbc:db2:myDBName

IBM DB2<server>


Eg: jdbc:db2://localhost:6789/myDBName



Eg: jdbc:sybase:Tds:localhost



Eg: jdbc:teradata://localhost
, tmode=ANSI, charset=UTF8

Microsoft SQL


Eg: jdbc:sqlserver://localhost



Eg: jdbc:postgresql://localhost

MS Access (JDBC-ODBC Bridge)sun.jdbc.odbc.JdbcOdbcDriverjdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};


Eg: jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};

Above things are mandatory for establishing connection with corresponding databases before actually creating/executing any SQL queries

Related Articles :

References :

Happy Coding !!
Happy Learning !!

Java – Core JDBC components
Java – JDBC Driver types