开发者

What is hibernate in simple language?

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 wh开发者_StackOverflowat hibernate is.


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.


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.


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

What is hibernate in simple language?

It's mainly used for object persistence.

See Wikipedia entry:

Object-relational mapping (ORM)


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.


Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions. Hibernate is free software that is distributed under the GNU Lesser General Public License. Hibernate’s primary feature is mapping from Java classes to database tables (and from Java data types to SQL data types). Hibernate also provides data query and retrieval facilities. Hibernate generates the SQL calls and attempts to relieve the developer from manual result set handling and object conversion and keep the application portable to all supported SQL databases with little performance overhead.

You can see detail from here

http://viralpatel.net/blogs/introduction-to-hibernate-framework-architecture/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜