1

I have a java application with embedded H2 database.

The H2 database library is said to be written completely in java. So there must be an object oriented equivalent for SQL statements like 'SELECT * FROM TABLE TESTTABLE' just like Table.select('*') etc...

Or is there any simple easy to use object oriented database library for java? As i'm developing a small application for registering book names, authors names, genres list etc... for a book library, speed is not a big concern.

1
  • This kind of object-oriented equivalent is an ORM (Hibernate, for instance). Note however that the most important part in ORM is the R, not the O. Commented May 26, 2013 at 13:18

1 Answer 1

2

H2 is fundamentally an RDBMS (Relational Data Base Management System), so it's absolutely not "object oriented". It happens that its implementation is written with an object oriented language, namely Java, but it has strictly no consequence on its concepts.

That would similar to think that as you used a steel tool to shape a hammer in wood, the hammer is indeed steel...

As mentioned fge in its comment, to manipulate your database, currently managed by H2, in an object fashion, you need a specific library named ORM (for Object-Relational Mapping), for example http://www.hibernate.org/

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your help.. Could you please suggest me a good hibernate tutorial for beginners?
You can start with this entry in SO : stackoverflow.com/questions/650680/hibernate-tutorials

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.