Choosing a database software

There are OR-Mappers and there are OR-Mappers. Yes, full blown OR-Mappers with their own SQL dialect are a pain in the ass, but at the other end of the spectrum, it’s an even nastier pain in the ass to have to stuff those resultsets into HashMaps or instances of your own classes manually.

I usually work with utility methods that for generate the often used queries, like a simple SELECT statement (listing the columns in a table) and methods that pump the resultset into instances of classes that have the same structure as the table. It has support for foreign keys, to make it a bit more convenient. If I weren’t allowed to use such a minimal OR-Mapper, I’d probably quit that job. Life is too short to write SQL in Java. :-X

OR-Mapper? that things that translate my object class into table?

[quote=“Riven,post:21,topic:38370”]
I lately had a project with JOOQ, but I am not quite sure, if I like it or not…

When picking your data store I’d say it’s not about what language you’re writing your code in, but rather what kind of data you’re intending to store and what the requirements around reading and writing are.

I would also suggest you stay away from OR frameworks or at least seriously evaluate the pros and cons of using one. They tend to put you in a right mess if you use them the wrong way.

I really liked using hsqldb. Its a Java DB with some quite nice features.
-in memory db inside your own application(no server setup required).
-write some sql commands in java(don’t know what they are called, like insertion hooks)

hsqldb -> H2