<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 21:08:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Handling several DBALs in Symfony2 through the Dependency Injection with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19044</guid>
      <link>http://www.phpdeveloper.org/news/19044</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a second post in his series looking at using the Symfony2 dependency injection container with Doctrine functionality. In his <a href="http://phpdeveloper.org/news/19007">previous post</a> he talked about sharing PDO connections via the DIC. In <a href="http://gonzalo123.com/2013/01/14/handling-several-dbal-database-connections-in-symfony2-through-the-dependency-injection-container-with-php/">this latest one</a> it's focused on the sharing of DBALs from Doctrine.
</p>
<blockquote>
OK. We can handle PDOs connections inside a Symfony2 application, but what happens if we prefer DBAL. As we know DBAL is built over PDO and adds a set of "extra" features to our database connection. It's something like PDO with steroids.
</blockquote>
<p>
He includes the (PHP) configuration to set up the DBAL and the YAML definition to set it up in the DIC's configuration. As an update to the post, he also points out a bundle for Symfony2 that lets Doctrine do this natively - check out <a href="https://github.com/doctrine/DoctrineBundle/blob/master/Resources/doc/configuration.rst#doctrine-dbal-configuration">this documentation</a> on github.
</p>]]></description>
      <pubDate>Wed, 16 Jan 2013 10:47:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Database Abstraction Layers in PHP. PDO versus DBAL]]></title>
      <guid>http://www.phpdeveloper.org/news/16579</guid>
      <link>http://www.phpdeveloper.org/news/16579</link>
      <description><![CDATA[<p>
In <a href="http://gonzalo123.wordpress.com/2011/07/11/database-abstraction-layers-in-php-pdo-versus-dbal/">this new post</a> to his blog, <i>Gonzalo Ayuso</i> compares two technologies that can make working with databases in your applications simpler - <a href="http://php.net/manual/en/book.pdo.php">PDO</a> and the Doctrine2 <a href="http://www.doctrine-project.org/projects/dbal/2.0/docs/en">DBAL</a> layer.
</p>
<blockquote>
In fact DBAL isn't a pure database abstraction layer. It's built over PDO. It's a set of PHP classes we can use that gives us features not available with 'pure' PDO. If we use Doctrine2 we're using DBAL behind the scene, but we don't need to use Doctrine2 to use DBAL. We can use DBAL as a database abstraction layer without any ORM. Obiously this extra PHP layer over our PDO extension needs to pay a fee. I will have a look to this fee in this post.
</blockquote>
<p>
He includes a few simple benchmarking scripts that compare similar operations done by either, including memory usage and execution time. PDO comes out on top, obviously, because it's an extension versus a set of PHP libraries that need to be included in the application. He does include examples of a few things he likes that DBAL does that PDO doesn't by default - a transactional mode, type conversion, a simpler binding interface and the ability to nest transactions.
</p>]]></description>
      <pubDate>Tue, 12 Jul 2011 10:14:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate' Blog: Creating SQL schemas with Doctrine DBAL]]></title>
      <guid>http://www.phpdeveloper.org/news/15621</guid>
      <link>http://www.phpdeveloper.org/news/15621</link>
      <description><![CDATA[<p>
On his blog today <i>Sameer Borate</i> has a new post looking at <a href="http://www.codediesel.com/mysql/creating-sql-schemas-with-doctrine-dbal">using Doctrine DBAL to make schemas</a> rather than having to make them by hand each time (can be very useful for reloads with fixtures).
</p>
<blockquote>
A tedious task during web development is that of database schema creation. A schema containing a few tables comprising of a small set of rows is quick, while that containing dozens of tables and large numbers of columns is a tedious process. I usually resort to a small php script with some regular expression tossed in to automatically create a schema from a text file definition. But that is a little buggy as I've to manually add the indexes and other small things. Now that Doctrine has released a DBAL library, this will provide a nice ability to automatically create sql schemas.
</blockquote>
<p>
He introduces the <a href="http://www.doctrine-project.org/projects">DBAL abstraction layer</a> and includes a basic script to create a schema for a MySQL database, manually adding the columns and setting up things like primary keys and foreign key constraints. He also includes the SQL statements that it will generate and execute on your Doctrine-based connection.
</p>]]></description>
      <pubDate>Wed, 22 Dec 2010 14:25:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[David Coallier's Blog: Simple DBAL, PHP5, Light, Fast, Simple.]]></title>
      <guid>http://www.phpdeveloper.org/news/8540</guid>
      <link>http://www.phpdeveloper.org/news/8540</link>
      <description><![CDATA[<p>
<i>David Coallier</i> has <a href="http://blog.agoraproduction.com/index.php?/archives/49-Simple-DBAL,-PHP5,-Light,-Fast,-Simple..html">posted about</a> a database abstraction layer that he's been developing for PHP 5.2.x only systems and wants some opinions on his methods:
</p>
<blockquote>
I made a very light DBAL that uses PHP5.2.x only (Since many people seem to want that) and it has the exact same DSN syntax as MDB2 for now and the query method are also called the same (No API Changes). [...] The main goal of the DBAL is to have a very effective and light way of switching RDBMS but also the possibility to change your DBAL to something more "0feature complete" as such as MDB2.
</blockquote>
<p>
He <a href="http://blog.agoraproduction.com/index.php?/archives/49-Simple-DBAL,-PHP5,-Light,-Fast,-Simple..html">includes the list</a> of query method names and the types of databases that he wants it to support (as well as mentioning the fact that it would be unit tested for reliability).
</p>]]></description>
      <pubDate>Tue, 28 Aug 2007 09:32:00 -0500</pubDate>
    </item>
  </channel>
</rss>
