SQL and Relational Databases
seancorfield/next.jdbc is the defacto Clojure wrapper for SQL queries and managing connections to relational databases.
next.jdbc supports a wide range of databases and automatically pulls in the relevant database drivers. Abstractions are provided for insert, query, update and delete actions, which define data in a hash map allow the use of Clojure specifications (clojure.spec or Malli) for validation and generative testing.
This guide will use the following relational databases
- H2 database - lightweight in-process database that writes to disk, easily added for a fast and simple dev environment.
- Postgresql - open source, feature rich and production grade database (defacto production choice)
Other persistent storage approach include
- Amazon RDS - a postgres-like storage as an AWS service (should work just like postgres)
- CockroachDB an elastic, indestructible SQL database for developers building modern applications
- yugabyteDB open source, cloud native relational DB for powering global, internet-scale apps.
Key Value stores
- RocksDB is a high performance embedded persistent key-value store with fast storage writes (fork of Google's LevelDB)
- AWS Dynamo - 400k limit per stored value
- Crux - open database with temporal graph query
- Datomic - transactional database with a flexible data model, elastic scaling, and rich queries Interesting databases in the Clojure spaces include Datomic and Crux.
Database drivers for commonly used database
- Apache Derby
- Microsoft SQL Server jTDS
- Microsoft SQL Server -- Official MS Version
Database drivers may require a minimum version of Java, so consider Java 8 as the minimum version and Java 11 as the recommended version (until a new long term support version of Java is release).
see database support at http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html (is this up to date?)