Hibernate basic Article

Source: Internet
Author: User

First, what is it? Hibernate is a data access framework (persistent layer framework) that enables the use of hibernate frameworks in a project to make additions and deletions to the database and to build a persistence layer for the business layer. Using this framework simplifies data manipulation code, and programmers can focus more on business writing. It is essentially a encapsulation of JDBC technology, and Hibernate and JDBC are similar to the relationship between jquery and JavaScript. :


Second, the principle of design? The hibernate framework is an ORM tool. Developed based on the ORM design idea.
Orm:object--relation--mapping Object Relational Mappings
Object refers to the entity object of Java;
Relationships refer to relational databases. (Oracle, DB2, MYSQL, SQL Server)
The main idea of ORM is to automate the mapping of the objects in the program and the data in the database. With the ORM tool, records can be automatically encapsulated as Java objects when queried. You can automatically write objects to a data table when you update or insert an operation. For the intermediate SQL+JDBC operation details, it is completely encapsulated at the bottom of the tool.
There are many frameworks, such as HIBERNATE,IBATIS,JPA, that are designed based on ORM ideas.
Third, the framework structure? Introduction of so many theoretical knowledge, presumably everyone's head has been a little inflated it! Then let's take a closer look at it from the thought of the diagram.
Through the above structure diagram, we can see that hibernate of several major interfaces and classes play a very important role, then let us further understand the relationship between these interfaces!

See after is not suddenly, originally hibernate interface is such a relationship ah?? Look forward to the practice in future projects.
Iv. Advantages and Disadvantages:
1. No need to write a large number of complex SQL statements, improve productivity 2. The entity objects in the program and the data in the database implement the automatic mapping transformation, which makes the development more object.        3. Facilitate the porting of the database. 4. No intrusion, support transparent persistence.
Disadvantages:
1. Statements that use database attributes will be difficult to tune.
2. There is a problem with the large volume data update
3. There are a lot of statistical query functions in the system.
Five, summed up the first on the basic knowledge of hibernate to explain, first from the macro on the control, so as to achieve the enemy. Then in the next will be a detailed analysis of it from the microscopic.

Hibernate basic Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.