Object/relational mapping (ORM) is the process of persisting objects in a relational database. ORM bridges the gap between object and relational schemas,allowing your application to persist objects directly without requiring you to convert objects to and from a relational format.There are many types of ORM solutions, offering varying levels of mapping support. Some ORM frameworks require that persistent objects inherit from a base class or perform post-processing of bytecode.

Hibernate, on the other hand, requires a small amount of metadata for each persistent object. Hibernate is a noninvasive ORM service. It doesnít require bytecode processing or a base persistent class. Hibernate operates independently of application architecture, allowing it to be used in various applications. It provides full object/relational mapping, meaning that it supports all the available object-oriented features that relational databases lack.

Developers accustomed to using the standard JDBC API may wonder why a tool like Hibernate is needed. After all, JDBC provides a simple and complete interface to relational databases. Using JDBC directly is ideal for basic applications, since you can quickly persist objects with well-understood code. However, JDBC can get out of hand with larger applications or when requirements change. If an object changes, the code that persists the object must be changed and tested, as well as all the SQL used to manage the objectís state. Using Hibernate for application persistence helps avoid the drawbacks of raw JDBC.ORM is a good solution for legacy databases when the schema:
Is highly normalized.
Has primary keys.
Has foreign key relationships referring to primary keys, not columns.

 




Sandeep Joshi
Mathematics, Technology and Programming are my passion. I am a part of Java Ecosystem and through this blog, I contribute to it. I am here to blog about my interests, views and experiences.
I am on Google+ and Facebook.
I feel proud to be listed as a "National Memory Record Holder" in the Limca Book of Records, 2009 and have attempted for an International Memory record in the Guiness Book of Records. I can remember the value of PI upto 10,000 digits after the decimal (3.1415.....). You can contact me on javagenious.com(At)gmal.com ; I would like to hear from you :)