Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Active Record implementations for PHP

Tuesday, January 22nd, 2013 by Servage

You should know about Active Record and the benefits it’s usage could have for your project. Please consider the following Wikipedia description: “In software engineering, the active record pattern is an architectural pattern found in software that stores its data in relational databases. The interface of an object conforming to this pattern would include functions such as Insert, Update, and Delete, plus properties that correspond more or less directly to the columns in the underlying database table.”

There are many ways of implementing this in your project – most MVC frameworks come with some implementation out of the box. However, you may not want such a framework, or you wish a smaller footprint, or maybe combine some components yourself. Either way, there are plenty of options available to you.

In PHP there are a few Active Record implementations which are supported with regular development and a sizable community available for support. Please have a look at the following suggested libraries to kickstart your development:


The Doctrine library is very extensive and offers lots of database and modeling related help. You can quickly define and use data models and access the data base, using some of the many built in query methods, or perform standard CRUD operations.


Like above, the Propel library offers plenty of help to get started quickly. Propel is, however, a more lightweight library, solely focused on the Model functionality. It’s probably a little quicker to learn than Doctrine.

Active Record implementations for PHP, 3.5 out of 5 based on 2 ratings
Categories: Guides & Tutorials, Software & Webapps


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.