ORM

Object-Relational Mapping

“Although this is usually referred to as object-relational mapping, there is really nothing to do with objects here.” Cf. Martin FOwler

Références

“A lot of people pick up an ORM because they don’t want to take the time to learn the underlying SQL (Structured Query Language).” Cf. Why you should avoid ORMs (with examples in Node.js)

“The object/relational mapping problem is hard.” ORM Hate (Martin Fowler)

“Tables are not business objects! Tables aren’t objects at all. Tables are just data structures that the true business objects use as a resource.” The Clean Code Blog by Robert C. Martin (Uncle Bob)

“The Object-Relational Impedence Mismatch” The Vietnam of Computer Science (Ted Neward's Blog)

Key concepts

underfetching

Une seule requête à la BD ne ramène pas toutes les données nécessaires

Cas d'usage :

overfetching

Une requête à la BD ramène plus de données que nécessaire.

Cas d'usage :

Synthèse

Les ORM sont :