Which Java Database API is the easiest to use?

I am returning to Java from Ruby and ActiveRecord and want to use something as simple as ActiveRecord in Ruby. What are my options?

+6
java database api
source share
4 answers

There is a project recently released by a colleague called ActiveJDBC , which is an implementation of ActiveRecord for Java.

+7
source share

Most likely, it will be some kind of relational object mapping structure that you ultimately use. Grails (Java Rails as a framework) has GORM:

http://www.grails.org/GORM

If you are not using a web framework then this will be a problem. be some kind of ORM structure - Hibernate, OpenJPA, etc.

http://www.hibernate.org/

If you do not want to do the full heavy weight ORM method, look at something like MyBatis (used for iBatis) that has SQLMaps:

http://www.mybatis.org/

+3
source share

Hibernate provides very good access to ActiveRecord. There are tools for reverse engineering models from the database. I support it simply and works well for me.

+3
source share

I like the JPA (Java Persistence API) itself. Easy setup and the right tools allow you to create a database from classes or generate classes from a database. Easily customize your classes with annotations you can use.

I myself use the OpenJPA implementation.

+1
source share

All Articles