Home  >  Article  >  Java  >  What are the basic contents of ORM in java?

What are the basic contents of ORM in java?

WBOY
WBOYforward
2023-05-05 17:40:101310browse

1. The concept of ORM

ORM (object relational mapping) object relational mapping refers to the establishment of an object in Java and a table in a relational database A mapping so that the operation object can operate on the tables in the database.

2. The role of ORM

Make a mapping between the relational database and the object, so that when we specifically operate the database,No need to deal with complex SQL statements, just operate it like usual objects.

3. Advantages of ORM

(1) Improves development efficiency. Since ORM can automatically map fields and attributes between entity objects and tables in the database, a dedicated and huge data access layer is no longer needed in actual operations.

(2) ORM provides mapping to the database to obtain data from the database like an operating object without direct SQL coding.

4. Disadvantages of ORM

(1) In terms of system structure, systems using ORM are generally multi-layer systems. reduce.

(2)

Performance is mainly reflected in the extraction of persistent objects and data processing. When using ORM, the system may extract all data into memory objects. It is then filtered and processed, which can cause performance problems.

(3) Object

PersistenceIn terms of object persistence

, ORM will generally persist all attributes, which is not expected for some applications. ###

The above is the detailed content of What are the basic contents of ORM in java?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete