Directory Image
This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Privacy Policy.

Hibernate a framework for mapping in java

Author: Info Campus
by Info Campus
Posted: Apr 28, 2017

Introduction:

Hibernate is an Object-Relational Mapping(ORM) solution for JAVA and it raised as an open source persistent framework developed by Gavin King in 2001. It is a powerful, high performance Object-Relational Persistence and Query service for any Java Application.

Hibernate maps the Java classes to database tables and from Java data types to SQL data types and relieve the developer from 95% of common data persistence related programming tasks.

Hibernate sits between traditional Java objects and database server to handle all the work in persisting those objects based on the appropriate O/R mechanisms and patterns.

What is Hibernate?

Hibernate is an object-relational mapping (ORM) library for Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database.java/j2ee classes bangalore Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions.

Hibernate facilitates the storage and retrieval of Java domain objects via Object/Relational Mapping.

What Hibernate Does?

  • Map Java class to database tables & vice versa - Data query and retrieval facility - Generate the SQL query based on the underline database. - Create application portable to all relational databases. - Increase performance by providing the different levels of cache(First, Second and Query level). Supported Databases:
Hibernate supports almost all the RDBMS. Some RDBMS given below-

    • HSQL Database Engine
    • DB2/NT
    • MySQL advanced java training in bangalore
    • PostgreSQL
    • FrontBase
    • Oracle
    • Microsoft SQL Server Database
    • Sybase SQL Server
    • Informix Dynamic Server
Supported Technologies:

Hibernate supports a variety of other technologies, including the following:

    • XDoclet Spring
    • J2EE
    • Eclipse plug-ins
    • Maven

Hibernate Architecture:

The Hibernate architecture includes many objects as persistent object, session factory, transaction factory, connection factory, session, transaction etc.

There are 4 layers in hibernate architecture java application layer, hibernate framework layer, backhand api layer and database layer.

Elements of Hibernate Architecture : SessionFactory

The SessionFactory is a factory of session and client of ConnectionProvider. It holds second level cache (optional) of data. Java training center bangalore

The org.hibernate.SessionFactory interface provides factory method to get the object of Session.

Session

The session object provides an interface between the application and data stored in the database. It is a short-lived object and wraps the JDBC connection. It is factory of Transaction, Query and Criteria.

It holds a first-level cache (mandatory) of data. The org.hibernate.Session interface provides methods to insert, update and delete the object. It also provides factory methods for Transaction, Query and Criteria.

Transaction

The transaction object specifies the atomic unit of work. It is optional. The org.hibernate.Transaction interface provides methods for transaction management.

ConnectionProvider

It is a factory of JDBC connections. It abstracts the application from DriverManager or DataSource. It is optional. java course in bangalore

TransactionFactory

It is a factory of Transaction. It is optional.

Advantages of Hibernate: - Hibernate takes care of mapping Java classes to database tables using XML files and without writing any line of code. - Provides simple APIs for storing and retrieving Java objects directly to and from the database. - If there is change in Database or in any table then the only need to change XML file properties. - Abstract away the unfamiliar SQL types and provide us to work around familiar Java Objects. - Hibernate does not require an application server to operate - Manipulates Complex associations of objects of your database best core java training in bangalore - Minimize database access with smart fetching strategies. - Provides Simple querying of data. This is the description of the hibernate framework in java. To learn the java join Infocampus Software Training Institute for Core & Advanced Java Training.

Author: Infocampus provides best java/j2ee classes bangalore with the 100% job support. Fully practical classes are available for advanced java training in bangalore.Learn JDBC, JSP, Servlet, Java Beans, SOAP, Callback Ajax etc in java course.

Pay fees in installaments.Join Infocampus for java training center in bangalore and get a chance to clear the interview easily. Every weekend mock test and mock interviews conducted to provide the best core java training.

For the free demo classes call at : 9738001024 or to know the syllabus of core & advanced java enquire at :http://www.infocampus.co.in/java-training-bangalore.html

About the Author

A Real Time Software Training Institute 100% Guaranteed JOB Support Get Real Time Training from Industry Experts Book Free Demo Class

Rate this Article
Leave a Comment
Author Thumbnail
I Agree:
Comment 
Pictures
Author: Info Campus

Info Campus

Member since: Feb 08, 2017
Published articles: 45

Related Articles