Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using which database technology could I persist objects? (Something that does NOT require me to take care of mapping objects to tables and back)?

I need to use an object oriented data repository for a project.
It's going to be something between a wiki and a CMS.

I'm not an expert in the field of persistence yet.
I suppose Hibernate and Jackrabbit are the frameworks to go, right?

As far as I'm informed correctly, Jackrabbit does not support
annotations or other convenience techniques for mapping
between object instances and data storage.

Hibernate, on the other hand, does not support versioning
out-of-the box.

What would you suggest me to use?
Could I in some way combine both these frameworks?

Could you also, if possible, summarize the pros and cons of the two frameworks?

Thank you!

EDIT
I really would like to use something that does NOT require me to take care of mapping objects to tables and back. Why should I? In which century do we live? ;)

I had good experience with JAXB (mapping objects to XML and back in an object-oriented way), but JAXB has no use in databases.

like image 469
ivan_ivanovich_ivanoff Avatar asked Jun 18 '09 17:06

ivan_ivanovich_ivanoff


People also ask

Which of the following is known as the mapping between the tables of the database and objects of the Java?

Object-Relational Mapping or ORM is a technique for converting data between Java objects and relational databases. ORM converts data between two incompatible type systems (Java and MySQL), such that each model class becomes a table in our database and each instance a row of the table.


2 Answers

db4o is an object oriented database. As it's OO you store the objects directly so you don't have to maintain any mappings to tables.

like image 169
Mark Avatar answered Oct 06 '22 23:10

Mark


Oracle Berkeley DB Java Edition

Is a direct persistence layer (no mapping to a relational database).

like image 25
Brian Avatar answered Oct 06 '22 23:10

Brian