Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 2.83 KB

orm.md

File metadata and controls

39 lines (28 loc) · 2.83 KB
title updated permalink
What is ORM?
March 14, 2016
/faq/databases/orm/

ORM (Object-relational mapping), also known as O/RM, and O/R mapping is a programming approach for converting data between incompatible type systems.

Many full stack frameworks provide their own database abstraction approaches or ORMs.

Standalone database abstraction layers and ORMs to check out:

  • Aura SQL - Extension to the native PDO along with a profiler and connection locator.
  • DataMonkey - Database ORM for PHP build on top of Doctrine.
  • Doctrine - Home to several PHP libraries primarily focused on database storage and object mapping. The core projects are a Object Relational Mapper (ORM) and the Database Abstraction Layer (DBAL) it is built upon.
  • Eloquent - Illuminate Database component, used in Laravel framework but also a standalone component.
  • Medoo - Light PHP database framework to accelerate development.
  • Pomm - PHP Object Model Manager for Postgresql.
  • Propel - A highly customizable and blazing fast ORM library.
  • ProxyManager - Library that aims at providing abstraction for generating various kinds of proxy classes.
  • RedBeanPHP - Easy to use ORM for PHP.
  • safemysql - A real safe and convenient way to handle MySQL queries.
  • Spot ORM - simple and efficient DataMapper built on Doctrine Database Abstraction Layer.
  • Zend\Db - Zend Database Component.

Design patterns

There are mainly two main design patterns used in ORMs - Active Record and Data Mapper.

When not to use ORM?

As some articles have pointed out (1, 2, 3), ORM is anti-pattern that violates principles of object-oriented programming.

See also

Here are some other useful and updated resources to read or check as well: