What is the difference between Atitit ORM Implementation mode Data-mapper mode and Active-record mode?

Source: Internet
Author: User

What is the difference between atitit orm Implementation mode Data-mapper mode and active-record mode?

1.1. this is from the node. js Route about mixing two ORM modes activerecord(active recording mode) and Data Mapper(map mode) 1

1.2. Obviously,the Active Record is relatively simple, but not flexible enough, and Data Mapper is flexible, but with an entity manager added complexity. 1

1.1. This is from the node. js Route about mixing two ORM modes activerecord(active recording mode) and Thinking of data Mapper (map mode)

. The essence is the difference between the blood loss model and the congestion model, which leads to the Mastery
Ddd

of necessity.

First of these two persistence modes are characterized as follows:

The activerecord (active recording mode) is a relationship between a domain model object field and a table field that stores 1:1 , that is, a single model fields corresponding to a data table, and then the model object provides a save () method is used to persist model objects to the storage layer, and the model is to know the data layer, which is coupled with the data persistence layer.

They also have the simplicity of an Active Record



Data Mapperis completely loosely coupled between the domain model object and the data table.
Domain objects are only responsible for handling business logic and do not know the data layer, which is decoupled from the data layer; Use an entity manager to persist model objects to the storage layer; The field of the model object can be any name
That you can map to different fields of the data-tier data table as long as you conform to the business model

The flexibility of the data mapper has the advantage that the field of the model object does not have to correspond to the field one by one of the datasheet.

1.2. Obviously,the Active Record is relatively simple, but not flexible enough, and Data Mapper is flexible, but with an entity manager, it adds complexity.

author :: nickname : old Wow's paw Claw of Eagle idol iconoclast image-smasher

Bird King "Bird Catcher Kok devout pious religious defender Defender of the Faith. Caracalla Red Cloak Caracalla Red Cloak King of the Beast

abbreviation:: Emir attilax Akbar Emile Atiraca

Full Name:: Emir Attilax Akbar bin Mahmud bin Attila bin Solomon bin Adam Al Rapanui Emile Atilax Akbaben Maham Solomon Ben Adam Arrapano Iraq

Common name: Etila (Ayron), Email:[email protected]

title:Head of Uke headquarters , founder of global Grid project,

Uke Friendship Association President UKE Hunting Association President Emir Uke Tribe chief Grand Chief,

Uke , Minister of Religious and Cultural Integration Affairs, Vice-Chairman of the Uke Reformation Commission

Uke System and chairman of the major conference committee,uke Security Department Chief Brigade , uke System Inspection Committee vice president,

Uke chief CTO Software Division Director of Technical department deputy Director of Research and Development department Director of Product department deputy Manager Project department deputy manager uke Science and Technology Research Institute Dean UK E software training Master

Uke Polynesia District chain Head of the region of Tonga Kingdom director of the Uke Kerr Glen, chain head, Line Is. District,uke Bouvet and South Georgia and South Sandwich Is. regional chain head

Uke, chairman of the Association of Software Standardization , Vice president of Uke Database and storage Standardization Association

Uke , founder of Uke Hospital and medical School, vice president of lifelong education school

UEC , President of Uecip , director of uke Document retrieval Department, head of Department of Image processing machine Vision

Uke, chief Dean of the School of image processing and machine vision

Uke Outdoor Sports Association chairman of the resort chief Mayor Uke Press editor

reprint Please indicate source:Attilax 's column http://blog.csdn.net/attilax

http://www.cnblogs.com/attilax/

--atiend V9

What is the difference between Atitit ORM Implementation mode Data-mapper mode and Active-record mode?

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.