r/Clojure • u/pdroaugust312 • Oct 08 '25
Question about databases in the Clojure ecosystem from a Rails dev's perspective
I'm coming from Rails and have a question about databases.
In Rails, the preference is to use established databases, such as MySQL, Postgres, and more recently SQLite.
As I entered the Clojure world, I've noticed a greater openness to two previously unknown databases: Datomic and XTDB.
I'm completely unfamiliar with these databases. Would they be appropriate for general applications (CRUD), or do they have specific use cases? What about the track record of these databases? Have they been tested over time?
Thanks.
33
Upvotes
View all comments
Show parent comment
2
u/seancorfield Oct 09 '25
Bear in mind that you can treat XTDB as a "traditional" PostgreSQL database because it is PG-wire compatible -- meaning most PG tooling works with it out-of-the-box. Its primary API is SQL and you can use it via JDBC with
next.jdbc(and HoneySQL -- which has several XTDB-specific extensions built-in now).next.jdbc's test suite includes XTDB amongst its "supported databases", alongside MS SQL Server, PG, MySQL, MariaDB, etc.