5--Hibernate basic Usage--1 2 Basic mapping method

Source: Internet
Author: User

The ORM tool provides a mapping between persisted classes and data tables. In fact, all ORM tools follow the same mapping approach in general, and the ORM Basic mapping has the following mapping relationships:

⊙ data Table Mapping class: The Persistence class is mapped to a data table. When a program uses this persisted class to create instances, modify properties, and delete instances, the system is automatically converted to CRUD operations on the table.

An ORM-Managed persistence class (which is an ordinary Java class) corresponds to a data table that can be converted to the operation of the corresponding data table as long as the program operates on the persisted class.

⊙ row-mapped objects (that is, instances) of the data table: persisted classes generate many instances, each of which corresponds to a row of records in the data table. When a program modifies an instance of a persisted class in the app, the ORM tool translates to the action on a particular row in the corresponding data table.

⊙ the properties of the data table's column (field) Map object: When the program modifies the specified property of a persisted object (the persisted instance maps to the data row), the ORM is converted to the action that executes the data row, executes the column in the corresponding data table.

Based on this basic mapping, ORM tools can accomplish the mapping between the object model and the relational model. Thus, in the ORM framework, the persistence object is an intermediary, the application only needs to manipulate the persistence object, and the ORM Framework is responsible for converting this operation into the underlying database operation------The conversion is transparent to the developer without the developer's concern, freeing the developer from the relational model. Enables developers to manipulate relational databases with object-oriented thinking.

La La la

5--Hibernate basic Usage--1 2 Basic mapping method

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.