(1), object/relational database mapping (ORM)
ORM (obejcgt/relation Mapping, object/relational database mapping): Complete object-oriented programming language-to-database mapping (the bridge between object-oriented programming languages and databases); He can wrap relational databases into object-oriented models
The only function of the ORM tool is to convert the increment, delete, and change of persistent objects into operations on the database.
(2), basic mapping method
The ORM Basic mapping has the following mapping relationships:
Data table Mapping class: The Persistence class is mapped to a data table, and when the persisted class is used to create, modify, and delete properties, the system automatically converts to CRUD operations on the table
Row-mapped objects (that is, instances) of a data table: persisted classes generate many instances, each of which corresponds to a row of records in the data table. When you modify an instance of a persisted class in your app, the ORM tool is converted to the action on a specific row in the corresponding data table
Data table column (field) mapping object properties: When you modify the 2 specified property of a persisted object in the app (the persisted instance maps to the data row), the ORM is converted to the operation of the specified data row, specified column in the corresponding data table
(3) Introduction to the popular ORM framework
Jpa:jap itself is an ORM specification, not an ORM product. JPA entities are very similar to Hibernate po, and even JPA entities can be used entirely as Hibernate PO classes
Hibernate: Open Source ORM Framework, has been selected as a persistent layer solution for JBoss
Ibatis:apache the subproject of the Software fund; because it does not support purely object-oriented operations, it gradually begins to be superseded, but for some places where data access is particularly flexible, IBATIS is more flexible, allowing developers to write SQL statements directly
Toplink:oracle Company's Products
(4), Hibernate overview
Hibernate: A Java-oriented object/relational database mapping tool used to map objects represented by object models to SQL-based relational model data structures, and for data-centric purposes, often using stored procedures in the database to implement business logic, Hibernate may not be the best solution, but for Java-based middleware applications, designed with an object-oriented business model and business logic, Hibernate is the most useful
Hibernate compared to other ORM frameworks:
Open source and free license;
Lightweight Package
Extensible, API Open
The developer is active, the product has the stable development safeguard
Hibernate-----1, ORM and Hibernate