Hibernate Introduction

What is Hibernate:

Hibernate is the ORM tool given to transfer the data between a java (object) application and a database (Relational) in the form of the objects.  Hibernate is the open-source lightweight tool given by Gavin King.

Hibernate is a non-invasive framework, which means it won't force the programmers to extend/implement any class/interface, and in hibernate we have all POJO classes so its lightweight.

Hibernate can run within or with the out server, I mean it will suitable for all types of java applications (stand-alone or desktop or any servlets bla bla.)

Hibernate is purely for persistence (to store/retrieve data from Database).

 

Draw Backs of JDBC:

  • In JDBC, if we open a database connection we need to write in the try, and if any exceptions occurred catch block will takers about it, and finally used to close the connections.
  • here as a programmer, we must close the connection, or we may get a chance to get our connections message…!
  • If we didn’t close the connection in the final block, then JDBC doesn’t respond to close that connection.
  • In JDBC we need to write SQL commands in various places after the program has created if the table structure is modified then the JDBC program doesn’t work, again we need to modify and compile and re-deploy required, which is tedious.
  • JDBC used to generate database related error codes if an exception will occur, but java programmers are unknown about this error code right.
  • In the Enterprise applications, the data flow within an application from class to class will be in the form of objects, but while storing data finally in a database using JDBC then that object will be converted into text.  Because JDBC doesn’t transfer objects directly

 

Related Articles

post a comment