简体   繁体   中英

What's the best value Java object database?

What's the best value Java object database out there that has:

  • Ease of use: one line of code to store any object.
  • Efficient memory usage: ie only loads the things that are called for, not the whole object every time (ie "Transparent Activation").
  • Automatically change objects when manipulated (ie "Transparent Persistence").
  • Native querying (no need for SQL, JDOQL etc.)
  • Free

where anybody has experience with the following:

  • Neodatis
  • db4o
  • JODB
  • joafip
  • MyOODB

?

I can only answer for db4o. I don't have enough experience with the other databases you've named.

  • Ease of use: I think that db4o is very easy to use in many scenarios. You add the db4o jar to your project, open the database and start storing and querying objects .
  • Efficient memory usage: Yes, db4o can do that. It supports transparent activation . In that mode db4o loads only objects which you are actually using.
  • Automatically change objects when manipulated: Is also supported .
  • Native querying: Yes db4o supports that. Native queries are great and powerful. However in practice complex native queries often cannot be optimized and run slow. In such cases you have to fall back to less elegant SODA queries.
  • It's free under a GPL licence.

Another advantage of db4o that has a community which can help and share knowledge.

Do you have a particular use case scenario for the database? I think that you should pick the database which fits you're application the best.

I have recently used HyperGraphDB , which satisfies all your requirements. I am pretty impressed with it: "HyperGraphDB is a general purpose, open-source data storage mechanism based on a powerful knowledge management formalism known as directed hypergraphs. While a persistent memory model designed mostly for knowledge management, AI and semantic web projects, it can also be used as an embedded object-oriented database for Java projects of all sizes. Or a graph database. Or a (non-SQL) relational database."

Take a look at Redis:

http://redis.io/clients

It has Java clients and from personal experience, Java objects map better to Key-Value based databases than Relational DBs but YMMV depending on your usage patterns and types of data.

Note: It may not cover all of your requirements above, but you could probably add such functionality yourself fairly easily.

Update: https://github.com/xetorthio/johm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM