Log In to start Learning

Login via

Post By Admin Last Updated At 2020-06-15
Hibernate Overview
Hibernate Overview:

This Hibernate instructional exercise gives inside and out ideas of Hibernate Framework with rearranged illustrations. It was begun in 2001 by Gavin King as a contrasting option to EJB2 style element bean. The steady arrival of Hibernate till July 16, 2014.

Hibernate Framework:

Hibernate framework rearranges the improvement of java application to connect with the database. Rest is an open source, lightweight, ORM (Object Relational Mapping) device.

An ORM instrument disentangles the information creation, information control and information get to. It is a programming procedure that maps the protest the information put away in the database.ORM TTool

Advantages of Hibernate:

1) Opensource and Lightweight2) Fast performance3) Database Independent query4) Automatic table creation5) Simplifies complex join6) Provides query statistics and database status
Hibernate Architecture:

The Hibernate architecture contains many items determined object, session factory, transaction factory, connection factory, session, transaction etc.

Architecture of Hibernate

Elements of Hibernate
·         SessionFactory·         Session·         Transaction·         ConnectionProvider·         TransactionFactor

 To create the Hibernate Application in Eclipse IDE

  1. Create the java project
  2. Add jar files for hibernate
  3. Create the Persistent class
  4. Create the mapping file for Persistent class
  5. Create the Configuration file
  6. Create the class that retrieves or stores the persistent object
  7. Run the application
To create the Hibernate Application in MyEclipse IDE
  1. Create the java project
  2. Add hibernate capabilities
  3. Create the Persistent class
  4. Create the mapping file for Persistent class
  5. Add mapping of hbm file in configuration file
  6. Create the class that retrieves or stores the persistent object
  7. Add jar file for oracle
  8. Run the application
Hibernate with Annotation

The Hibernate application can be made with comment. There are numerous explanations that can be utilized to make rest application, for example, @Entity, @Id, @Table and so on.

Hibernate Annotations depend on the JPA 2 determination and backings every one of the elements.

All the JPA comments are characterized in the javax.persistence.Package Hibernate EntityManager executes the interfaces and life cycle characterized by the JPA determination.

Web Application :

As we make the straightforward application in hibernate, we don't have to play out any additional operations in rest for making web application. In such case, we are getting the incentive from the client utilizing the JSP file.

Generator classes in Hibernate: All the generator classes actualizes theorg.hibernate.id.IdentifierGenerator interface. Assigned.
  1. increment
  2. sequence
  3. hilo
  4. native
  5. identity
  6. seqhilo
  7. uuid
  8. guid
  9. select
  10. foreign
  11. sequence-identity
SQL Dialects:
RDBMSDialect
Oracle (any version)org.hibernate.dialect.OracleDialect
Oracle9iorg.hibernate.dialect.Oracle9iDialect
Oracle10gorg.hibernate.dialect.Oracle10gDialect
MySQLorg.hibernate.dialect.MySQLDialect
MySQL with InnoDBorg.hibernate.dialect.MySQLInnoDBDialect
MySQL with MyISAMorg.hibernate.dialect.MySQLMyISAMDialect
DB2org.hibernate.dialect.DB2Dialect
DB2 AS/400org.hibernate.dialect.DB2400Dialect
DB2 OS390org.hibernate.dialect.DB2390Dialect
Microsoft SQL Serverorg.hibernate.dialect.SQLServerDialect
Sybaseorg.hibernate.dialect.SybaseDialect
Sybase Anywhereorg.hibernate.dialect.SybaseAnywhereDialect
PostgreSQLorg.hibernate.dialect.PostgreSQLDialect
SAP DBorg.hibernate.dialect.SAPDBDialect
Informixorg.hibernate.dialect.InformixDialect
HypersonicSQLorg.hibernate.dialect.HSQLDialect
Ingresorg.hibernate.dialect.IngresDialect
Progressorg.hibernate.dialect.ProgressDialect
Mckoi SQLorg.hibernate.dialect.MckoiDialect
Interbaseorg.hibernate.dialect.InterbaseDialect
Pointbaseorg.hibernate.dialect.PointbaseDialect
FrontBaseorg.hibernate.dialect.FrontbaseDialect
Firebirdorg.hibernate.dialect.FirebirdDialect