Skip to content

Driver Implementations

Every database has its own driver implementation. Like mentioned before, those drivers are responsible to translate between java and your database. They map a java datatype to their sql types and vice versa.

You can usually find those drivers via Google when you search for <database> jdbc. You also probably want to use a build tool to integrate those drivers into your application. But I am sure you know how to do this.

Some drivers are operable for multiple databases. For example the mysql driver can be used for mariadb as well. Of course, it does not support the full feature set of mariadb, and you will encounter issues when doing more complex stuff, but it is possible to perform basic operations.

Let's take a look at the Drivers you will probably need. I will show you the way to import them and link the maven repository search, where you can find the latest version. All drivers implement the JDBC specification.

PostgreSQL

Latest version

Latest version

Maven

<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>version</version>
</dependency>

Gradle

implementation("org.postgresql", "postgresql", "version")

MariaDB

Latest version

Latest version

Maven

<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>version</version>
</dependency>

Gradle

implementation("org.mariadb.jdbc", "mariadb-java-client", "version")

MySQL

Latest version

Latest version

Maven

<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    <version>version</version>
</dependency>

Gradle

implementation("com.mysql", "mysql-connector-j", "version")

SqLite

Latest version

Latest version

Maven

<dependency>
    <groupId>org.xerial</groupId>
    <artifactId>sqlite-jdbc</artifactId>
    <version>version</version>
</dependency>

Gradle

implementation("org.xerial", "sqlite-jdbc", "version")