Work with Relational Databases
By virtue of running on the Java Virtual Machine, Clojure works with any database that can be accessed via Java Database Connectivity (JDBC). With it, we can easily access a large number of RDBMS databases, such as MySQL, SQL Server, PostgreSQL, and Oracle. The core library for dealing with relational databases is clojure.java.jdbc. When using this library we have to write custom SQL for each type of database we intend to use.
Most Clojure database libraries are based on clojure.java.jdbc. One such library that we’ll cover in this chapter is called HugSQL. This library takes the approach of keeping the SQL separate from the Clojure source files.
Another popular library is called Honey SQL. This ...