Introduction to hibernate core idea and interface

Hibernate is an open source framework using ORM mechanism persistence layer. Next, let's talk about its core ideas and interfaces.

Core idea: ORM is to map the operation between tables into the operation between objects, which simplifies the code of persistence layer and reduces the burden of programmers

ORM is a technology to solve the mismatch between object-oriented and relational databases. In short, ORM is to automatically persist objects in Java programs to relational databases by using metadata describing the mapping between objects and databases. In essence, it is to transform data from one form to another.

All hibernate applications will access the five core interfaces of hibernate.

Configuration interface: configure hibernate, start hibernate from the root, and create sessionfactory objects.

Sessionfactory interface: initialize hibernate, act as a proxy for the data storage source, and create a session object.

Session interface: responsible for saving, updating, deleting, loading and querying objects.

Transaction interface: manage transactions.

Query and criteria interface: execute database query.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>