architect-handbook

Software Architect Handbook

View on GitHub

Object Relational Mapping (ORM)

ORM is a technique for converting data between incompatible type systems using object-oriented programming languages. This creates, a “virtual object database” that can be used from within the programming language.

This involves translating the logical representation of the objects into an atomized form that is capable of being stored ina database while preserving the properties of the objects and their relationships so that they can be reloaded as objects when needed. If this storage and retrieval functionality is implemented, the objects are said to be persistent.

Comparison with traditional data access techniques

Advantages

Disadvatages

Challenges

A variety of difficulties arise when considering how to match an object system to a relational database. These difficulties are referred to as the object-relational impedance mismatch.