Hibernate Introduction Functionality Details
What is Hibernate: Development with both Object-Oriented programming and Relational Databases could be cumbersome and very time consuming. Cost of development are significantly higher because of paradigm mismatch between how/where data is represented in the objects vs relational databases. Hibernate is solution for Java environment for object/Relational Mapping (ORM). Its a technique to mapping data between an object model representation to the relational data model representation.
Hibernate was developed for the people who don’t have strong background in SQL only if you are having basic understanding of the concepts how it works then its easy to understand Hibernate more quickly and fully. It’s important to understand data modelling principles and below link is good starting point:
It takes care mapping from Java classes to database table and from Java data types into SQL data types. It also provides data query and retrieval facilities. It could significantly reduce time of development and spent with manual data handling of SQL and JDBC. It’s design goal is to relieve developer from common data persistence related programming tasks by eliminating need for manual process or hand-crafted data processing using SQL and JDBC. Although unlike many other persistence solutions out there Hibernate doesn’t hide the power of SQL and guarantees investment in relational technology stability over the time.
Some important point: It may not be the best solution for data centric applications where only stored procedures used to implement business logic. It’s useful with object oriented domain models where business logic in Java based middle tier. Although it can certainly help to remove or encapsulate vendor specific SQL code and streamlines common tasks of translating result sets from tabular representation to graph of objects.
- Object Relational Mapping (ORM) : This functionality enables developers to write applications easily whose data outlives the application process. As Object Relational Mapping framework, Hibernate is related with data persistence as it applies to relational databases (using JDBC)
- Reliable : It’s is well known for its excellent quality & stability which is proven by the industry acceptance and used by thousands of Java developers
- Extensibility : It’s highly configurable and extensible
- Scalability : It’s designed to work in application server clustered environment and deliver highly scalable architecture performance. It scales well in any environment where it can drive in-house Intranet application which serves hundreds of users or for mission critical applications that serve thousands of clients
- High Performance : Hibernate supports numerous fetching strategies, lazy initialization and optimistic locking with automatic version and time stamping. It needs no special database tables and fields, it generates much of the SQL at system during initialization time instead of the runtime. It continuously offers superior performance over complex JDBC code, in terms of developer productivity and run-time performance
- JPA Provider : In addition other functionality to its own “native” API, it is also has an implementation of Java Persistence API (JPA) specification. So that it can easily used in any environment supporting JPA specification including Java EE application servers, Java SE applications, Enterprise OSGi containers etc.
- Persistence : It enables to develop persistent classes using natural Object oriented idioms including polymorphism, inheritance, association, composition and Java collections framework. It requires no interfaces or base classes to persist classes and enables any class or data structure to be persistent