Hibernate Example : One To Many Mapping
Hibernate Example : One To One Mapping
HIBERNATE, created by Gavin King, known as the best and dominated object/relational persistence (ORM) tool for Java developers (Now also supports .NET). It provides many elegant and innovative ways to simplifies the relational database handling task in Java.
Why O/R mapping?
(1) Productivity: It helps developers to get rid of writing complex and tedious SQL statement, no more need of JDBC APIs for result set or data handling. It makes developers more concentrate on the business logic and increases the project’s productivity.
(2) Maintainability: It helps reduce the lines of code, makes system more understandable and emphasizes more on business logic rather than persistence work (SQLs). More important, a system with less code is easier to re-factor.
(3) Portability: It abstracts our application away from the underlying SQL database and SQL dialect. Switching to other SQL database requires few changes in Hibernate configuration file (Write once/ Run-anywhere).