tags:

views:

78

answers:

4

Hi,

I'm a newbie. I keep seeing questions on hibernate on this site. I know how DBMS works and how to make an application talk to it. Help me understand what hibernate is.

+1  A: 

Hibernate fills the gap between your object classes and relational database tables in a database agnostic way meaning that you can easily switch databases without significant modifications of your application.

Darin Dimitrov
+3  A: 

Databases are relational. They are in tabular form. A number of modern languages are object orientated. Being object orientated does not map to relational very well. You either write your own way to save your objects to the database OR you use something like hibernate. Hibernate is an ORM or object relational mapper. It will turn your objects into a way to persists them into the database and vice versa.

uriDium
+2  A: 

A good start: http://www.hibernate.org/

alt text

It's mainly used for object persistence.

See Wikipedia entry:

Object-relational mapping (ORM)

NullUserException
+1  A: 

When you write code in object-oriented languages (C#, Java, C++, etc.), you are dealing with objects and classes.

When you work with relational databases (Oracle, SQL Server, Postgres, MySQL, Firebird, etc.), you are dealing with tables and rows.

Somehow you have to convert classes to tables and objects to rows, and vice versa. Hibernate allows you to convert between them easily.

There are other tools which do the same job as Hibernate, for example the ADO.NET Entity Framework from Microsoft.