Java- Hibernate-Part 1- Frame work Introduction



  • Hibernate is a persistence framework which is used to create persistent operations or Database operations. 
  • It was implemented by RedHat.
  • Hibernate is ORM(Object Relational Mapping) Tool.
  • It is implemented on the top of the JDBC Technology.You can use Hibernate API which internally connects JDBC to Database. 
  • When you write the JDBC code for implementing database operations, you need to perform the following.


try
{
      /*  Load the driver class(1)
          Get the connection(2)
          Prepare the SQL Statement(3)
          Create the JDBC statement(4)
          Submit the SQL Statement to Database(5)
          Process the results (6)
     */
}
catch(Exception e)
{
        // Resource clean up(7)
}


  • In the above code, statements 1,2,4,5,7 are common across JDBC programs. It creates code duplication problems.
  • In Hibernate, these processes are done by the hibernate system itself.

Comments

Popular posts from this blog

Hibernate Collection Mapping example

C programming:-Files - Part 5

Struts 2 Troubleshooting