What is hibernate

Page 1

What is Hibernate? Hibernate is an Object-Relational Mapping(ORM) solution for JAVA and it raised as an free chronic structure developed by Gavin King in 2001. It is a powerful, top rated Object-Relational Persistence and Query service for any Java Program. Hibernate charts Java sessions to information source platforms and from Java information kinds to SQL information kinds and relieve the designer from 95% of typical information persistence related development tasks. Hibernate sits between traditional Java things and information source server to handle everything in persisting those things based on the appropriate O/R systems and styles. Hibernate Advantages: 1.Hibernate manages applying Java sessions to information source platforms using XML data files and without writing any line of code. 2.Provides easy APIs for storing and accessing Java things directly to and from the information source. 3.If there is change in Database or in any table then the only need to modify XML information file qualities. 4.Subjective away the unfamiliar SQL kinds and provide us to deal with familiar Java Objects. 5.Hibernate does not require a software server to operate. 6.Manipulates Complex organizations of things of your database. 7.Reduce information source access with smart getting strategies. 8.Provides Simple querying of information. Supported Databases: Hibernate facilitates almost all the major RDBMS. Following is list of few of the information source engines reinforced by Hibernate. HSQL Database Engine


•DB2/NT

•MySQL

•PostgreSQL

•FrontBase

•Oracle

•Microsoft SQL Server Database

•Sybase SQL Server

•Informix Dynamic Server Supported Technologies: Hibernate facilitates a variety of other technological innovation, including the following: •XDoclet Spring

•J2EE

•Eclipse plug-ins

•Maven Hibernate uses various existing Java APIs, like JDBC, Java Deal API(JTA), and Java Labeling and Directory Interface (JNDI). JDBC provides a standard level of abstraction of performance found in relational information source, allowing almost information source with a JDBC driver to be reinforced by Hibernate. JNDI and JTA allow Hibernate to be incorporated with J2EE application web servers. Following section gives brief description of each of the category things involved in Hibernate Program Structure.


Configuration Object: The Settings item is the first Hibernate item you make in any Hibernate application and usually designed only once during application initialization. It symbolizes a configuration or qualities information file required by the Hibernate. The Settings item provides two keys components: Database Connection: This is managed through one or more configuration data files reinforced by Hibernate. These data files are hibernate.properties and hibernate.cfg.xml. Class Mapping Setup This component creates the outcomes of the Java sessions and information source platforms.. SessionFactory Object: Configuration item is used to make a SessionFactory item which then configures Hibernate for the applying using the supplied configuration information file and allows for a Session item to be instantiated. The SessionFactory is a line safe item and used by all the discussions of a software. The SessionFactory is high quality item so usually it is made during application start up and kept for later use. You would need one SessionFactory item per information source using a separate configuration information file. So if you are using several information source then you would have to make several SessionFactory things. Session Object: A Session is used to get a physical experience with a data source. The Session object is light and portable and designed to be instantiated everytime an connections is required with the data source. Chronic things are stored and recovered through a Session item. The session things should not be kept open for a long time because they are not usually line safe and they should be designed and damaged them as required. Transaction Object: A Deal symbolizes a device of work with the data source and most of the RDBMS facilitates transaction performance. Dealings in Hibernate are addressed by a transaction administrator and transaction (from JDBC or JTA).


This is an optionally available item and Hibernate programs may choose not to use this interface, instead handling transactions in their own application rule. Query Object: Query things use SQL or Hibernate Query Language (HQL) sequence to recover data from the data source and create things. A Query example is used to combine query factors, restrict the number of results came back by the query, last but not least to perform the query.

Java review by CRB Tech Java training is sufficient to make you consider and take up a career in this field.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.