Object Relational Mapping (ORM)

Object Relational Mapping is a tool that bridges the OOP world to databases: in general, and SQL in particular.

As its definition implies, such tool is able to take data from an object, and place it in a database’s table. The transfer may be straightforward, when the object is stored in one table. Or, it may be complex, when the same data are spread over multiple tables.

PHP has several ORM: Doctrine, Redbean, Eloquent, Propel, etc..

Documentation

See also PDO in PHP.

Related : Database Abstraction Layer (DBAL), Data Mapper, Code Generator, Data Mapper, N+1 Query Problem, Structured Query Language (SQL)

Related packages : doctrine/orm, illuminate/database, propel/propel, gabordemooij/redbean, thecodingmachine/tdbm