Saturday 20 July 2013

Introduction to ORM and Hibernate

    Introduction to ORM and Hibernate

Hibernate is an object Relational Mapping (ORM) Solution for the java language.

  • What is ORM?It is a program technique which links databases to object-oriented language creating(in effect) a "virtual object database"
  • it allows handling relational database with object view perspective that aligns more with typical J2EE architecture applications
  • it is a tool that bridges the application with the database by storing application with the database by storing application objects in the database rather than requiring the developer to write and maintain standard JDBC code to store and retrieve data objects.

ORM MAPPING OR ORM

  the process of mapping java class with database table, member variables with tables columns and java class with database table rows by having synchronization between them is called ORM mapping.

Synchronization between object and table row is nothing but modification in java object will reflect in table row vice-versa. ORM Frame work will take care of his synchronization so developer will only concentrate on persistence logic.


Ex:

class HiberEx
{
  private Integer empNo;
  private String empName;
  private String dept;
 //setters and getters
}

No comments:

Post a Comment