I have a single user java program that I would like to have store data in a light weight database such as Derby or Sqlite. I would like to use a data abstraction layer in my program. Hibernate appears to require a lot of configuration and is overkill for what I need. What are light weight alternatives to Hibernate?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
ORMAN framework is also good. https://github.com/ahmetalpbalkan/orman
Documentation: https://github.com/ahmetalpbalkan/orman/wiki
Comparison: https://github.com/ahmetalpbalkan/orman/wiki/Why-orman-is-better-than-other-orms-for-you%3F
I can propose apache empire-db. http://incubator.apache.org/empire-db/
Apache Empire-db is an Open Source relational data persistence component which allows database vendor independent dynamic query definition as well as safe and simple data retrieval and updating. Compared to most other solutions like e.g. Hibernate, TopLink, iBATIS or JPA implementations, Empire-db takes a considerably different approach, with a special focus on compile-time safety, reduced redundancies and improved developer productivity.
An example:
I might be a bit late to the party, but I released ActiveJDBC in 2010, which is an ORM implementation of ActiveRecord pattern, is more than 10 times lighter than Hibernate in dependencies, at least twice as fast at run time, and requires zero configuration or annotations.
Apache Commons DBUtils takes much of the repetitive gruntwork out of JDBC programming. It requires little configuration and is easy to learn. It is not an ORM framework (in the way that Hibernate and other frameworks mentioned here are) but it does automate mapping of SELECT columns to Java member fields as well as other repetitive JDBC programming tasks. It's certainly lightweight.
jOOQ ships with a fluent DSL simulating SQL directly in Java as a side-effect for its main goals which are:
Read about jOOQ in this article: http://java.dzone.com/announcements/simple-and-intuitive-approach, or visit the website directly: http://www.jooq.org
(Disclaimer, I work for the company behind jOOQ)
It still requires XML configuration, but have a look at MyBatis (formerly iBatis).