What methods to use a database from Clojure are there?
I know from Clojure you can do anything you can with Java, but that means that I may end up using something overly
I've used Berkeley DB for a simple key/value database in Clojure. See here.
You could also try CLJ-Record, https://github.com/duelinmarkers/clj-record
I would now (as of late 2011) recommend Korma - "Tasty SQL for Clojure"
It's a beautiful little SQL DSL, here's an example from the website:
(select users
(aggregate (count :*) :cnt)
(where (or (> :visits 20)
(< :last_login a-year-ago))))
clojure-contrib has an sql library which is a thin wrapper around JDBC (java.sql.DriverManager). The test file that comes with it has some examples of its usage.
There's ClojureQL which embraces relational algebra.
Then there is SQLLite. Have a look at this simple example: https://github.com/ogrim/clojure-sqlite-example