Home / Databases / Comprehensive List of the Object Relational Mapping Tools and Frameworks. Part One: PHP

Comprehensive List of the Object Relational Mapping Tools and Frameworks. Part One: PHP

Sponsored links

libhound.com-orm-php
Object Relational Mapping (ORM), is a database design approach that makes entities stored in the database behave like objects (classes) from a programming perspective. ORM is a level above actual database operations – writing actual SQL queries is excluded from development and taken care of by ORM framework.
By abstracting actual database access with ORM, development process can be more productive and result in more reliable applications. Here you will find a quick intro to ORM in PHP.

Doctrine – PHP Object Relational Mapper (www.doctrine-project.org)

Doctrine is an object relational mapper (ORM) for PHP 5.2.3+ that sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.

Outlet ORM (www.outlet-orm.org)

Outlet is an open source object-to-relational mapping tool for PHP. It differs from other orm solutions for php in that it provides transparent, unobtrusive persistence. It does not require your entity objects to implement any interfaces or extend some sort of base class. It is also very lightweight, only a handful of classes and tools. It uses an approach similar to hibernate in java, using proxy objects that save the data behind the scenes.

Propel ORM Framework (propel.phpdb.org/trac/)

Propel is an Object-Relational Mapping (ORM) framework for PHP5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data. Propel allows you, the web application developer, to work with databases in the same way you work with other classes and objects in PHP.

phpDataMapper (www.phpdatamapper.com)

phpDataMapper is a project to add the power and flexibility of a full-featured DataMapper to any PHP project in a very easy and portable way. It is an implementation of the Data Mapper pattern written in object-oriented PHP5. This project draws inspiration from the Ruby DataMapper project. phpDataMapper can be seen as kind of a simplified “translation” of the Ruby project to PHP, with changes in syntax where appropriate to better fit the PHP style. Under development.

Pork.dbObject (www.schizofreend.nl/pork.dbobject/)

It’s an Object-Relation mapper for PHP 5 that attempts to be easy, fast, lightweight, uses optimized database queries and provides an easy Find() function very loosely based on rails’. Also, i’m coming with Pork.Generator: A PHP5 based database analyzer that automatically sees the different types of relations in your (MySQL) database and creates linked dbObjects for it.

Repose (www.repose-php.org)

Repose is an ORM tool for PHP. Similar to Hibernate and inspired by Outlet, another ORM tool for PHP. Repose’s goal is to provide developers with a tool to aid in persisting object data in a relational database. Reposes provides Unit of Work (UoW) and Object-Relational-Mapping (ORM) while attempting to remain as unobtrusive to the domain model as possible. Repose is still very early in its development, but so far the only restrictions on the domain model are that the classes are not marked final and properties are not marked private. Beyond that, there are no other restrictions on the classes and they may be more or less Plain Old PHP Objects (POPO).

dORM (www.getdorm.com)

dORM is a PHP 5 ORM (object relational mapper) library that seamlessly loads, saves and deletes PHP objects from and to a relational database (currently, only MySQL was tested). dORM requires a small XML file that maps classes to their respective database tables. We plan to offer automatic mapping in a future release.

RedBeanPHP ORM (www.redbeanphp.com)

Redbean is an ORM layer that designs a database – on the fly – to fit your code. With RedBeanPHP you don’t need configuration files, data mapping files or SQL imports. You even don’t have to write models! Just enter your database connection string and include RedBean. Re dBean will just generate all the tables you need out of the blue as soon as you start coding. What’s more… RedBean also takes care of indexes, redundant tables and eliminates race-conditions. Object relational mapping coding has never been this easy!

PHP ActiveRecord (www.derivante.com/…)

The PHP ActiveRecord is inspired by Ruby on Rails ActiveRecord. The main goal for this project has been to allow PHP developers tackle larger projects with greater agility.

ORMer (www.greaterscope.net/projects/ORMer)

This is an approach to Object-Relational Mapping (Active Record) written in PHP5. There are no XML config files, or assumptions about table and field names. It’s a tool to keep you from repeatedly writing mindless SQL join queries and other trivially common things.

CoughPHP: PHP ORM (www.coughphp.com)

Cough is an extremely lightweight PHP ORM framework for dealing with objects that have single table counterparts in a database. Cough is built to be easy to learn, use, and extend. Cough generates all the code you need for managing the object model-to-relational model mapping. This includes simple methods for all your CRUD functionality. This also includes Cough Collection classes that represent the relationships between tables in your data model.

PHPLinq (www.phplinq.net)

PHPLinq is an attempt to port .NET’s LINQ (Language-Integrated Query) to PHP.

    PHPLinq currently supports:

  • LINQ operators select, take, skip, orderBy, thenBy
  • Lambda expressions
  • Anonymous types

EZPDO (www.ezpdo.net)

The goal of this project is to design a lightweight and easy-to-use persistence solution for PHP. This is how the project got its name, Easy PHP Data Objects (EZPDO).

    Here is a quick look at the features in EZPDO:

  • Minimum SQL knowledge required
  • Requires minimum ORM specification
  • No Phing! No need of explicit command line compile
  • Works with existing code and database
  • Has a small runtime core to guarentee performance
  • Handles 1:N, and M:N relationships automatically
  • Provides a simple runtime API
  • Supports object query (EZOQL)
  • Auto generates database tables
  • Test-driven with continuous integration

 
 

Tagged with: | |

5 Responses to “Comprehensive List of the Object Relational Mapping Tools and Frameworks. Part One: PHP”

  1. TheLoneCabbage Says:

    FlourishLib
    http://flourishlib.com/

    is an anti-framework, that includes an automatically configuring ORM (through Foreign_Keys), and fully cross platform (Oracle, Mysql (InnoDB&MyISAM), Postgress, SQL Server…etc)

    Flourish is very simple and quick to learn.

    Note: I use flourish but I am in no way associated with them.


  2. Karan Says:

    There’s also DataSourceORM. I like how especially simple it is to use.


  3. Comprehensive List of the Object Relational Mapping Tools and Frameworks. Part One: PHP | Databases | Libraries and Components for Software Developers… Says:

    [...] View original post here: Comprehensive List of the Object Relational Mapping Tools and Frameworks. Part One: PHP | Databases … [...]


  4. Giorgio Sironi Says:

    Doctrine is the default orm in Symfony and I am contributing to the 2.x branch, which will be the “Hibernate for Php” like Outlet, embracing the Unit of Work pattern and classes that does not extend anything.
    What worries me is that Zend Framework could be the standard choice for applications, but lacks a Data Mapper implementation.


  5. 網站製作學習誌 » [Web] 連結分享 Says:

    [...] Comprehensive List of the Object Relational Mapping Tools and Frameworks. Part One: PHP [...]


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>