top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Why we are using hibernate and how does it help in the programming?

+1 vote
303 views
Why we are using hibernate and how does it help in the programming?
posted Feb 3, 2015 by Kali Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Hibernate is the ORM (Object Relational Mapping).

->Hibernate will act like bridge between Application and Database.
->Hibernate use to access Database properties like (Tables, Views, Stored Procedures)

Hibernate Example:

Create Class:
public class Employee {
   public virtual int Emp_Id{ get; set;}
  public virtual string Emp_Name{get;set;}
}

-->COLUMN field for specify Table column field
-->Name field for specify Class Variable

<hibernate-mapping>
   <class name="Employee" table="EMPLOYEE">
      <meta attribute="class-description">
         This class contains the employee detail. 
      </meta>
      <id name="Emp_Id" type="int" column="id">
         <generator class="native"/>
      </id>
      <property name="Emp_Name" column="name" type="string"/>
   </class>
</hibernate-mapping>
answer Feb 3, 2015 by Balamurugan Kn
...