Over a million developers have joined DZone.

Doctrine: The Object Relational Mapper for PHP

DZone's Guide to

Doctrine: The Object Relational Mapper for PHP

· Database Zone ·
Free Resource

Download "Why Your MySQL Needs Redis" and discover how to extend your current MySQL or relational database to a Redis database.

I have read a lot about domain/model driven design, OOP best practices, etc. I have been using PHP for almost 10 years and I have always desired a way to build a relational database and represent it with a set of PHP classes using associations, inheritance, and collections.

Many other languages like ruby, java and python have fully featured ORM(object relational mapper) solutions which are great. PHP has many projects which call themselves ORM's but they are more of a glorified database abstraction layer. Almost one year ago I come across a very young project called Doctrine.

Doctrine is an ORM for PHP that sits on top of a powerful DBAL (database abstraction layer). One of its key features is the ability to optionally write database queries in an OO (object oriented) SQL-dialect called DQL inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains a maximum of flexibility without requiring needless code duplication.

Read "Developing Apps Using Active-Active Redis Enterprise" and discover the advantages over other active-actve databases.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}