News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
Relational Databases for Dummies
March 14, 2013 @ 10:43:13

If you're relatively new to PHP development or have just meaning to get into using relational databases with your application, you should check out this new post from NetTuts giving a "for dummies" approach to learning about RDBMSes.

Web apps can be split into two major components: a front-end that displays and collects information, and a back-end for storing the information. In this article, I'll demonstrate what a relational database is, and how to properly design your database to store your app's information.

They describe the usage of a database in several steps (no code is included, just SQL at the end):

  • Get Some Data
  • Remove Repetitive Data Across Columns
  • Remove Repetitive Data Across Rows
  • Linking Tables with Keys

This is followed by links to a few of the different RDBMSes out there and a brief introduction to what SQL is and what it looks like.

0 comments voice your opinion now!
relational databases introduction tutorial


Web & PHP Magazine:
Issue #12 - Don't Get in a PECL
March 08, 2013 @ 10:23:36

The latest issue of the Web and PHP Magazine has been published - issue #12, "Don't get in a PECL". This latest issue includes articles like:

  • "The Power of PECL" by Simon Holywell
  • "Be 'ready' if you want to be done!" by Steffan Surdek
  • "All Data is Relational" by Cory Isaacson
  • "Fixing PHP Production Problems with APM" by Dan Delany and Chris Kelly
  • "Trust" by Sebastian Bergmann

You can download your copy for free from their site and catch up on back issues.

0 comments voice your opinion now!
webandphpmagazine issue pecl recursion relational data websockets


DevShed:
Building an ORM in PHP Domain Modeling
November 22, 2011 @ 16:46:10

Continuing on from the first part of their series, DevShed has posted part two of their "Building an ORM in PHP" series. This latest tutorial focuses on domain modeling (and collection handling).

In that first part, I implemented the ORM's data access and mapping layers. And as you'll surely recall, the entire implementation process was pretty straightforward and easy to follow. Of course, in its current state the ORM is still far from a fully-functional structure. We need to add some additional components to it, such as a domain model and the classes responsible for handling collections of entities (remember that the ORM relies heavily on the data mapper pattern to do its business properly).

He stays with his "simple blog" example and shows domain models (based on an abstract entity) for Entries, Comments and Authors. His containers extend the Countable, IteratorAggregate and ArrayAccess interfaces to give them some extra abilities.

0 comments voice your opinion now!
tutorial domain model orm database mapping relational


Developer.com:
Doctrine Object Relational Mapping for Your PHP Development
June 14, 2010 @ 10:22:06

New on Developer.com today there's a new article looking at one of the more powerful ORM tools available for PHP - Doctrine.

Because of the relational database's pivotal role in driving Web applications, a great deal of time and effort has been put into creating tools that not only simplify the task of mapping database tables to a programming language's object-oriented class structure, but also facilitate the management of your data and schemas over the project lifecycle. [...] The PHP community also has a powerful database integration tool at their disposal: a project known as Doctrine.

They help you get started with this powerful tool by showing you how to get it installed, create a sample schema and loading some fixtures (base data). There's also a quick snippet of code showing you how to grab information from a sample user table and display the name of the user.

0 comments voice your opinion now!
doctrine object relational map orm tutorial


Doctrine Blog:
Doctrine 1.0.8 and 1.1.0-RC2 Released
March 03, 2009 @ 10:24:36

Guilherme Blanco passed along a note about the latest releases from the Doctrine project, Doctrine 1.0.8 and 1.1.0-RC2:

Today I am happy to tell you that we have two new versions of Doctrine available for you to use. The first is the monthly maintenance release for Doctrine 1.0 and the second is another release candidate for the newest major version of Doctrine, 1.1. As always you can grab them from the downloads page.

Updates in these two versions include a few backported fixes from 1.1, updates to the Doctrine_Query::count() method for optimization, and several fixes in the Release Candidate in preparation for the next release. You can see the full Changelogs here: 1.0.8 and 1.1.0-RC2.

1 comment voice your opinion now!
doctrine release maintenance orm object relational mapper layer


Seastian Bergmann's Blog:
Object-Relational Behavioral Patterns
February 16, 2009 @ 12:08:47

Seastian Bergmann has added some new features to the Object_Freezer library (you can read more about it here) - some new object-relational behavioral patterns.

The three patterns are from Martin Fowler's Patterns of Enterprise Application Architecture book:

  • Unit of Work - maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
  • Identity Map - each object gets loaded only once by keeping every loaded object in a map
  • Lazy Load - object that doesn't contain all of the data you need but knows how to get it.
0 comments voice your opinion now!
object freezer object relational patterns martinfowler pattern


PHPClasses.org:
PHP Object-Relational Mapping ORM or ROM?
October 10, 2008 @ 12:09:37

On the PHPClasses.org blog today Manuel Lemos has posted a look at ORM - what it is and how you can use it to improve your applications.

Object-Relational Mapping, usually referred as ORM, is a software development approach to treat data stored in relational (SQL) database table records as if they were objects. Basically we can create classes with variables that represent fields of a database table. To insert a table record you need to create an object of the class, assign the variable values, and call a function of the class that takes care of inserting the table record

He illustrates what it is (brief code samples) and some of the approaches that developers have taken to implementing it. He suggests, however, that they should truely be called ROM (Relational Object Mapping) libraries rather than ORM due to the fact that they map an object (the database tables) back in to PHP objects. He finishes with a list of a few ORM resources and libraries including the one that helps power the PHPClasses website, Metastorage.

0 comments voice your opinion now!
phpclasses orm object relational mapping database layer


Developer Tutorials Blog:
Getting Started with ORM in PHP
July 16, 2008 @ 09:35:27

A recent post on the Developer Tutorials blog takes a look at a fundamental part of several of the PHP (and other language) frameworks out there - the Object Relational Mapping (ORM) layer for database access.

Instead of direct database access, an ORM layer in a PHP framework can make "objects" stored in a database behave like actual objects from a programming perspective - for example, creating a new "car" stored in the database could involve a call to $car->new(). By abstracting actual database access, web development can be more productive and result in more reliable applications. Here's a quick intro to ORM in PHP.

They talk about ORM's role in how applications interface with data (abstracted out to objects) and some examples of it in current frameworks - CakePHP and Symfony.

46 comments voice your opinion now!
orm object relational mapping cakephp framework symfony


Zend Developer Zone:
PHP and your domain model with Doctrine ORM
January 31, 2008 @ 08:40:00

On the Zend Developer Zone, jonwage has posted about an ORM (Object-Relational mapping) he came across that can help abstract out your interface with your backend database - Doctrine.

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.

The project's page gives the full details on the features it offers and has links to the latest downloads so you can try it out for yourself. There's even a blog you can subscribe to to keep up to date.

0 comments voice your opinion now!
php5 object relational mapping doctrine database abstraction


Sebastian Bergmann's Blog:
SQL Puzzle
December 05, 2007 @ 08:46:00

Sebastian Bergmann has figured out half of the puzzle he was working on but is still a bit stuck on the second half. He knows how to mine information from Subversion, but not they queries to ask the database for the info he needs.

I have written a small PHP script (the initial version of the script can be found here) to import the relevant data from a Subversion repository into the following tables of a relational database. [...] What I need now is two queries to ask the database

There's already been tons of comments in an effort to help him out, but it doesn't look quite like he's resolved the issue just yet.

UPDATE 12.06.207: Seems he's found a solution that'll work for him - here's the script.

0 comments voice your opinion now!
sql puzzle subversion relational database mine information query sql puzzle subversion relational database mine information query



Community Events





Don't see your event here?
Let us know!


code release zendserver community bugfix framework introduction development podcast list conference language deployment tips laravel developer interview api symfony series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework