Friday 29 November 2013

[Java] Hibernate basics with Eclipse

This entry proxies for a series of tutorials which introduces the basics of Hibernate for utter beginners. I only assume that the reader have a grasp of the Java and SQL semantics. Obviously, there is more to Hibernate than we have covered in these tutorials. A good sequel for these tutorials would cover the use of annotations to describe entity classes and their attributes. Other related entries would include lazy initialization, caching and some other mechanics regarding the use of Session objects, as well as the integration of Hibernate in enterprise applications.
It is worth mentioning that these tutorials are basically my notes when I was learning Hibernate.

1. Tutorials

  1. Hello Hibernate 4 with Eclipse Kepler: http://peace-and-code.blogspot.com/2013/10/java-hello-hibernate-4-with-eclipse.html;
  2. Hibernate 4 object states: http://peace-and-code.blogspot.com/2013/10/java-hibernate-4-object-states.html;
  3. Mapping relational concepts with Hibernate 4: http://peace-and-code.blogspot.com/2013/10/java-mapping-relational-concepts-with.html;
  4. Hibernate query basics: http://peace-and-code.blogspot.com/2013/11/tutorial-4-java-hibernate-query-basics.html.

2. Source code

This archive contains full Eclipse projects for the functional parts of the code used in the examples: http://sourceforge.net/projects/pnc-hib-basics-ex/files/. You need to populate lib directory with Hibernate jar files and your favorite DBMS's JDBC driver. Then, you have to edit hibernate.cfg.xml to use your database connection settings.
These projects were tested under a Linux environment (Debian Wheezy) using the software configuration mentioned in the first tutorial.

Thank you!

3 comments:

  1. This was really a nice article.Hibernate is one such effort from the Java community to develop many object oriented solutions to data persistency. Any kind of Java persistence solution includes two main elements i.e. ORM (Object Relational Mapping) and OOM(Object Oriented Modeling). The below link provide you info on Online Hibernate Training

    Hibernate has become immensely popular amongst the developer community as it is a free, powerful, high performance open source object - relational mapping persistence Java package that makes it easier to work with relational databases for Java Applications.

    Smart Mind Professional software training includes practical approach to get through the concepts of these languages. We provide our Online Java Hibernate Training by +15 International Experts with live project and 24*7 support.

    India : +91 9949599844
    US : + 1-347-606-2716
    Email:contact@smartmindonlinetraining.com

    ReplyDelete
  2. Thanks for this blog, Keep sharing your thoughts like this...
    Struts Course in Chennai
    Hibernate Course in Chennai

    ReplyDelete