<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fabrizio Balliano &#187; Zend_DB</title>
	<atom:link href="http://fabrizioballiano.net/tag/zend_db/feed/" rel="self" type="application/rss+xml" />
	<link>http://fabrizioballiano.net</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 15:22:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>What is lacking in Zend_DB to make it a full abstraction layer</title>
		<link>http://fabrizioballiano.net/2007/06/13/what-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer/</link>
		<comments>http://fabrizioballiano.net/2007/06/13/what-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 12:20:57 +0000</pubDate>
		<dc:creator>Fabrizio Balliano</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming languages]]></category>
		<category><![CDATA[Zend_DB]]></category>

		<guid isPermaLink="false">http://www.fabrizioballiano.net/2007/06/13/what-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer/</guid>
		<description><![CDATA[There are mainly 2 PHP abstraction layers out there: PEAR::MDB2 ADODB I used both for long time within P4A and the conclusion is that none of them is good enough, because of feature lacks, bugs, communication difficulties with the team. I have to say that MDB2 code is much clearer. But there&#8217;s something interesting coming [...]]]></description>
			<content:encoded><![CDATA[<p>There are mainly 2 PHP abstraction layers out there:</p>
<ul>
<li><a href="http://pear.php.net/package/MDB2">PEAR::MDB2</a></li>
<li><a href="http://adodb.sourceforge.net/">ADODB</a></li>
</ul>
<p>I used both for long time within P4A and the conclusion is that none of them is good enough, because of feature lacks, bugs, communication difficulties with the team. I have to say that MDB2 code is much clearer.</p>
<p>But there&#8217;s something interesting coming out from the enterprise world: <a href="http://framework.zend.com/manual/en/zend.db.html">Zend_DB</a>, really well written and planned, feature rich and with a good team behind, but as the team says &#8220;it&#8217;s not a full abstraction/portability layer&#8221; so why not fill the hole?</p>
<p>What&#8217;s missing:</p>
<ul>
<li>sequence emulation, creating a table on DBs where sequences are not implemented. PEAR::DB already did it since years. This approach is not the best if you look for performance but it&#8217;s perfect for portability.</li>
<li><a href="http://framework.zend.com/issues/browse/ZF-745">metadata retrieving from a query</a> instead than a table. We can read columns and metadata from a table but what about a query such as &#8220;SELECT * FROM table JOIN other_table&#8221;? We need to know which fields are returned, the data type and the table name.</li>
<li>metadata mapping between different db engines, building an abstraction layer between different datatypes on different db engines, something mapping MySQL tinyint(1) to PostgreSQL::boolean and so on. MDB2 and ADODB already do that thus adding this feature won&#8217;t be too painful.</li>
</ul>
<p>I&#8217;m also thinking about the redundancy of db adapters in PHP5 but that will be the subject of another post&#8230;</p>



Share/bookmark: 

	<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;title=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="Digg"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;title=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="StumbleUpon"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;t=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="Facebook"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;title=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="Reddit"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;title=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="Mixx"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;title=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="del.icio.us"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;title=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="Google"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google" alt="Google" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;title=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="Live"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a> 
	<a rel="nofollow" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Ffabrizioballiano.net%2F2007%2F06%2F13%2Fwhat-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer%2F&amp;h=What%20is%20lacking%20in%20Zend_DB%20to%20make%20it%20a%20full%20abstraction%20layer" title="NewsVine"><img src="http://fabrizioballiano.net/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a> 


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://fabrizioballiano.net/2007/06/13/what-is-lacking-in-zend_db-to-make-it-a-full-abstraction-layer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
