Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 724 Bytes

File metadata and controls

26 lines (20 loc) · 724 Bytes
layout pattern
title Data Mapper
folder data-mapper
permalink /patterns/data-mapper/
categories Architectural
language en
tags
Decoupling

Intent

A layer of mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself

Class diagram

alt text

Applicability

Use the Data Mapper in any of the following situations

  • when you want to decouple data objects from DB access layer
  • when you want to write multiple data retrieval/persistence implementations

Credits