Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Hibernate Overview
1. Object Relational Mapping
-Bridge between relational database and object world
User
*UserNo UserName UserType
122 Mark General
Order
OrderNo *UserNo Amount
10202020 122 100
public class UserEntity {
private Integer UserNo;
private String UserName;
private String UserType;
}
public class OrderEntity {
private Integer OrderNo;
private Integer Amount;
@OneToOne
UserEntity user;
}
ORM
Object World RDBMS World
2. Object Relational Mapping
Productivity
•Doesn’t need to handle JDBC resultset anymore
Maintainability
•Reduce lines of code
Portability
•Easy to switch to other DMBS
Free
•It’s an open source framework.
Popular
•Many reference in Google
Market demand it
•Advantages for your value
3. Birth of Hibernate
How can we persist an
object graph to a database?
The data objects has longer life
cycle than applications.
Hibernate JPA
7. Using Hibernate
3 Steps to start Hibernate :
1. Configure database connection
2. Create mapping definitions
3. Persist the classes
Two parts of configuration of database :
1. Creates the database connection
2. Objects to table mapping