What is Hibernate – Hibernate Introduction

Hibernate » on May 4, 2011 { 76 Comments } By Sivateja

In this tutorial am going to explain, why Hibernate came into picture though we have JDBC for connecting to the database, and what is this hibernate frame work first let us see what are the draw backs of JDBC


Draw Backs of JDBC:

  • In JDBC, if we open a database connection we need to write in 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 of connections message…!
  • Actually if we didn’t close the connection in the finally block, then jdbc doesn’t responsible 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 occurs, but java programmers are unknown about this error codes right.
  • In the Enterprise applications, the data flow with in 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.

In order to overcome above problems,  Hibernate came into picture..!

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 light weight tool given by Gavin King.

Hibernate is a non-invasive framework,  means it wont forces the programmers to extend/implement any class/interface, and in hibernate we have all POJO classes so its light weight.

Hibernate can runs with in or with 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).


You Might Also Like

  ::. About the Author .::

Sivateja Kandula - Java/J2EE Full Stack Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.


76 Responses to “What is Hibernate – Hibernate Introduction”
  1. I don’t normally comment but I gotta say thank you
    for the post on this perfect one 😀

  2. java4s says:

    thank you so much Millard Landkamer 🙂

    • pujitha says:

      Simply superb tutorial.One of my friends suggested Java 4s. This is really helps me clear understanding of the flow of framework. Thanks to sivateja for this fabulous tutorial!!! 🙂

  3. dev says:

    thanks a lot for this beautiful post…..

  4. java4s says:

    @dev – You’re welcome

  5. Mohammed vaseem says:

    Very Simple & best way of explaination

  6. Mohammed Vaseem says:

    Hello, In real time applications or projects, where we will be using Hibernate(in terms of SDLC and as well as Application development)?…

  7. Java4s says:


    Hibernate is purely for persistence purpose ….!!
    No chance we can use this framework for other purpose.

    Hibernate is only for persistence.

    • Ashish Sharma says:

      So we are using hibernate only for database purpose. Instead of JDBC, we are using hibernate to transfer data as a object to object. Is that right sir?

      Or any other use?

  8. Manoj Ekanayaka says:

    Thank you, easy to understand.

  9. Java4s says:

    @Manoj Ekanayaka

    Thanks for your feedback 🙂

  10. Alex says:

    I am a fresher in Java and this example given me clear to understand the flow of program.

  11. bobby says:

    Excellent tutorial…

  12. Java4s says:


    Glad to hear that its helped you, thanks for your feedback.

  13. karthic says:

    what is the meaning of persistence?

  14. Java4s says:


    Persistence : Continuous and connected period of time to the database.

  15. org.springframework.orm.hibernate.HibernateTemplate is a helper class which provides different methods for querying/retrieving data from the database. It also converts checked HibernateExceptions into unchecked DataAccessExceptions.

  16. Bhaskar says:

    Dear sir i want struts1.x tutorial please kindly consider my request and send me the respected tutorial sir.

  17. Yeah iT’s clear, Very Usefull, Thnqz a Ton 🙂

  18. Sanjeev Srivastava says:

    Good Tutorials I like very much..

  19. very good tutorials.. Its very helpful for us

  20. nage says:

    difference between hibernate 2 & 3?

  21. Arun says:

    Respected sir, by this tutorial we came to know that Hibernate is introduced due to overcome the problems of JDBC but in the case of .net we also have N-hibernate as it is the remake of hibernate then we dont have JDBC in dotnet then how come you say that hibernate is introduced due to overcome the limitations of JDBC and Hibernate is an ORM which is used to solve the miss-match problems between object and relational database.

  22. It’s good tutorial and easy way to learn hibernate

  23. It is a nice a tutorial it help me to be a familiar with hibernate….

  24. vani says:

    this article is soo clear thanks for you

  25. Karthi says:

    excellent post to understand Hibernate. thanks a lot for this nice precentation.

  26. Govardhanreddy says:

    Very good article. It is very helpful to the beginners.

  27. govind says:

    nicely explained…..rreally like this sir

  28. govind says:

    nice one sir….

  29. suri says:

    hi, really superb , simple and easy way to understand…thank you so much.. i request u to please explain complete hibernate in the same way to all of us… i request u to please send me the complete tutorial ..thanks

  30. Varun says:

    Nice Explanation of each and every part… Great Work !!!

  31. Yogesh Mude says:

    whatever article u have kept in site its very useful for all java people…
    and in simple language it means easy to understand for java begineers…

  32. vinod kumar says:

    Thank you sooo much…very use full content if u provide any pdf it will helpful for every one

  33. vishwa bk says:

    thanq so much for giving a much info about hibernate…

  34. vijaykumar says:

    thank you. so much for giving a clearcut concepts with examples about hibernate

  35. kamal says:

    thank you sir for this beautiful explanation.

  36. Anirban says:

    Great post.

  37. Manish says:

    Thank you so much for easy explanation of all content.

  38. AMAL ANTONY says:

    Thank you for this great post

  39. amrita says:

    very nice tutorial,helped me a lot

  40. Swati says:

    very nice tutorial..

  41. vinodkumar says:

    Thank you so much to you this content is very usefull

  42. Suhas says:

    Tutorial is good. But pls take care of grammar. ‘Cos its taking little more time to understand what you are trying to say. 😀

  43. Deepak Kumar says:

    Hii Admin,

    Its really very helpful articles for all freshers and experienced people.
    Can u plesae share JSP articles because JSP is very much needed for all kind of java people.

  44. Prabu says:

    Thanks a lot for your work 🙂 . My first ever comment in website for thanks.

  45. Archita patnaik says:

    Thank you so much sir..To the point explanation..very clear to concept…

  46. pega says:

    Thank you for your article it’s looks good and providing some valuable information

  47. Harish says:

    Hi sivateja,
    Thanks for providing such a nice tutorial. The explanation is really too good every one can understand by going through this tutorial.

  48. Vikash says:

    Thanks, for help with me.

  49. Anbarasu says:

    After two days of search,finally i landed in perfect site for hibernate learn.thank u for great introduction.

  50. ramay says:

    I am new to hibernate and fresher. the input is stored in db or not. it is showing error at doctype in .cfg.xml. output is error 404 page. why u r showing details on notepad. actually it should stored in db rgt.

  51. Chalapathi Rao says:

    Thank you very much for the information

  52. smp says:

    Nicely explained… thanks

  53. Deepak Gawai says:

    Nice and very usefull to the hibernate learner

  54. Macchindra MAne says:

    Nice explanation for freshers. We can easily answers if interviewers ask questions on Hibernate’s basic introduction. Thank you so much…!!!
    Nice One..

  55. Gowtham says:

    Good Explanation … Easily understand..Thanks..

  56. sajid says:

    Super explain

  57. pradeep says:

    can u explain exact meaning of a persistent object. what is the differencre from other with this

  58. Rishikesh Agrawani says:

    When I was about to visit for the first time, I didn’t judge that this site will provide me such a brief but detailed & complete knowledge of HIBERNATE framework & it will be very helpful for me but it was great. I am very happy today as I have gotten a best site for learning HIBERNATE. Now I’m thinking that I can learn HIBERNATE as early as possible. Thank you a lot to all the members of for developing such an efficient site for beginners & experienced.

  59. viren shah says:

    Hello sir,

    i need to know about the orm tool how it works and can u give me from where i should do projects..

  60. Gandhi says:

    Thank you for your site

  61. Mani says:

    Which version of hibernate is described in this tutorial. Hibernate 3.0?

  62. Tahashin says:

    really usefull tutorial thanks

  63. Lingaraj says:

    Thank u Very Much For This Post.Its Very Informative And Easy understandable.

  64. Govind says:

    Hi Can u please update the Concept's in Spring , MVC and Hibernate Concepts with latest version.

    This is my request to u my friend.

  65. devops says:

    very nice post, and informative post..

  66. Ashok says:

    Excellent. Very easy to understand the concepts.

  67. Dinesh Udaypure says:

    Excellent. Very easy to understand the concepts.Every one can understand easily.. & in-depth..

  68. Paras Agarwal says:

    The language is very easy to understand, her i cleard my many doubts.

  69. nagadurga says:

    This website is very good compared to other websites.
    Thank you for giving this information.

  70. vikas says:

    This is the best site ever seen

  71. Abhishek Kumar says:

    Thanks Sir It is very helpful for me

  72. Ramesh says:

    It's really superb explanation by this website


By posting your answer, you agree to our comments policy.
Most Recent Posts from Top Categories
Spring Boot Hibernate Spring
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2024 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.