<?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>php&#124;architect - The site for PHP professionals &#187; sql</title>
	<atom:link href="http://www.phparch.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phparch.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Fri, 10 Feb 2012 15:11:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PostgreSQL 9.0 beta released</title>
		<link>http://www.phparch.com/2010/05/postgresql-9-0-beta-released/</link>
		<comments>http://www.phparch.com/2010/05/postgresql-9-0-beta-released/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:00:35 +0000</pubDate>
		<dc:creator>Bill Karwin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5276</guid>
		<description><![CDATA[PostgreSQL has roughly one-quarter of the market share of MySQL, and I'd guess that PHP projects favor MySQL even more.  But PostgreSQL deserves some love from the PHP community too.  PostgreSQL is open source with a simpler license that's closer to PHP's license.  As RDBMS technology, PostgreSQL has always been more advanced than MySQL.  Don't you wish MySQL supported check constraints?  Sequences?  Recursive queries, common table expressions, and window functions?]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/05/540px-PostgreSQL_logo.3colors.svg_.png"><img src="http://www.phparch.com/files/2010/05/540px-PostgreSQL_logo.3colors.svg_-150x150.png" alt="" title="540px-PostgreSQL_logo.3colors.svg" width="150" height="150" class="alignleft size-thumbnail wp-image-5281" /></a>PostgreSQL has roughly one-quarter of the market share of MySQL, and I&#8217;d guess that PHP projects favor MySQL even more.  But PostgreSQL deserves some love from the PHP community too.  PostgreSQL is open source with a simpler <a href="http://www.postgresql.org/about/licence" target="_blank">license</a> that&#8217;s closer to PHP&#8217;s license.  As RDBMS technology, PostgreSQL has always been more advanced than MySQL.  Don&#8217;t you wish MySQL supported check constraints?  Sequences?  Recursive queries, common table expressions, and window functions?</p>
<p>This week PostgreSQL.org has <a href="http://www.postgresql.org/about/news.1198" target="_blank">announced the release of 9.0 beta 1</a>, showing that the project continues to advance rapidly (8.4 went GA less than a year ago).  The new beta release includes quite a few exciting and long-awaited features, including, but not limited to:</p>
<ul>
<li>New, easy to use binary replication</li>
<li>Continuous archive to warm standby or read-only slaves</li>
<li>Anonymous blocks</li>
<li>Mass grant/revoke operations</li>
<li>64-bit support on Windows</li>
<li>Named parameters for stored procedures</li>
<li>Per-column and conditional triggers</li>
</ul>
<p>Josh Berkus has written a <a href="http://it.toolbox.com/blogs/database-soup/90-beta-1-is-out-now-its-your-turn-38466?rss=1" target="_blank">post encouraging users to test</a> many interesting but perhaps less-publicized features in PostgreSQL 9.0.</p>
<p>Devrim Gunduz has written a blog on <a href="http://people.planetpostgresql.org/devrim/index.php?/archives/43-How-to-install-PostgreSQL-9.0-Beta-1-to-FedoraCentOSRHEL.html" target="_blank">how to install PostgreSQL 9.0 beta 1</a> on your Fedora/CentOS/RHEL Linux server.</p>
<p>The PostgreSQL wiki has a helpful article on <a href="http://wiki.postgresql.org/wiki/HowToBetaTest" target="_blank">How to Beta Test</a>.</p>
<p>You can download PostgreSQL 9.0 beta 1 source at <a href="http://www.postgresql.org/ftp/source/v9.0beta1/" target="_blank">postgresql.org</a>, or binaries for Linux, Mac or Windows at <a href="http://www.enterprisedb.com/products/pgdownload.do" target="_blank">enterprisedb.com</a> (you&#8217;re invited to register to gain access to tutorials, but you can download the software without registering).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/05/postgresql-9-0-beta-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using a framework? Why you should still learn OO and SQL</title>
		<link>http://www.phparch.com/2010/04/using-a-framework-why-you-should-still-learn-oo-and-sql/</link>
		<comments>http://www.phparch.com/2010/04/using-a-framework-why-you-should-still-learn-oo-and-sql/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 13:00:03 +0000</pubDate>
		<dc:creator>Carl Anderson</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5043</guid>
		<description><![CDATA[If you've only ever used a framework to do data-driven or object-oriented programming, you might not know as much as you think. Read why it's important to learn object-oriented programming and SQL...even if your framework does all the heavy lifting for you.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/04/blocks.jpg"><img src="http://beta.phparch.com/wp-content/uploads/2010/04/blocks.jpg" alt="" title="blocks" width="240" height="160" class="alignleft size-full wp-image-5044" /></a> It was just one short year ago that I began a new job working as a &#8220;programmer;&#8221; prior to that, I&#8217;d styled myself a &#8220;Web developer&#8221; or something similar, but the new job meant that I&#8217;d be doing something much different than before. During the interview, terms like &#8220;object-oriented programming&#8221; and &#8220;SQL&#8221; were tossed about, and I truthfully acknowledged that I understood and used such things in my working life, although not terribly frequently. (My previous job was a Filemaker and procedural programming shop.)</p>
<p>When I arrived and began programming Web applications, I took a look at CakePHP, and suggested we use it. Soon, it was implemented for basically all new development projects. I quickly realized, though, that I had a huge knowledge gap.  Sure, I know what object-oriented programming is, and even done a bit of stuff previously, but when my boss suggested we might use things like an <a href="http://en.wikipedia.org/wiki/Observer_pattern">observer pattern</a> on some legacy code, or when he talked of extending CakePHP&#8217;s controllers in various ways, I knew I&#8217;d need to expand my skills.</p>
<p>And even with the database side of things, where I felt a bit more comfortable, I found that my knowledge of SQL was a bit rusty in spots&mdash;such that I couldn&#8217;t decide if what CakePHP was doing (say, with joins) was correct or whether I&#8217;d need to do things differently.</p>
<p>Frameworks like <a href="http://cakephp.org/">CakePHP</a>, <a href="http://framework.zend.com/">Zend Framework</a>, and <a href="http://www.symfony-project.org/">Symfony</a> allow you to quickly and easily write a &#8220;real&#8221; application, but in doing so they tend to shield you from things like raw SQL and obviate the need to manually load or extend classes, for example. I contend that this is a good thing, but <em>only if you understand the &#8220;guts&#8221; of the system</em>&mdash;that is, OO and SQL, for example.</p>
<p>Why? Consider what happens if your framework loads data into a variable in a completely unexpected way. If you don&#8217;t understand the SQL that&#8217;s going on under the hood, what chance do you have of determining whether the framework is wrong&mdash;or perhaps you&#8217;re not calling the data in the right way?</p>
<p>In a similar vein, knowing how to program in an object-oriented way is also vital. I&#8217;ve looked at the <a href="http://lithify.me/">Lithium framework</a> recently, and confess to not understanding a lot of what&#8217;s going on. Sure, there&#8217;s some documentation, but I&#8217;m certain my learning process would be helped if I understood things like <a href="http://en.wikipedia.org/wiki/Singleton_pattern">singletons</a>, or <a href="http://en.wikipedia.org/wiki/Lazy_loading">lazy loading</a>, or even <a href="http://en.wikipedia.org/wiki/Anonymous_function">anonymous functions</a>.</p>
<p>This goes beyond mere debugging or learning new technologies. As in the example I gave earlier, it&#8217;s quite possible that you&#8217;re going to hit a point at which you want to do something the framework doesn&#8217;t do natively; in this case, your OO skills come into play, letting you get the job done. Or what if the framework can&#8217;t handle the poorly designed legacy database you inherited? Suddenly your SQL-fu doesn&#8217;t look so useless, since you&#8217;ll be able to write occasional custom queries when the framework falls flat.</p>
<p>But even beyond that, there will be times during which you can&#8217;t (or don&#8217;t want to) use a framework. I recently took a look at <a href="http://couchdb.apache.org/">CouchDB</a> and <a href="http://arbitracker.org/phpillow.html">PHPillow</a>, and I confess that I still can&#8217;t get PHPillow to work. My OO chops are simply not up to par. That experience taught me that I really need to start taking my favorite PHP book to bed with me a little more frequently.</p>
<p>So, even if you use a framework, take the time to get to know object-oriented programming and SQL (useful even if you&#8217;re using a document-oriented database, I think). They truly form the building blocks of programming.</p>
<p><em>Image of building blocks from Flickr user Artful Magpie. Published under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 Generic license. <a href="http://www.flickr.com/photos/kmtucker/3355551036/">http://www.flickr.com/photos/kmtucker/3355551036/</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/04/using-a-framework-why-you-should-still-learn-oo-and-sql/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New SQL Server driver released</title>
		<link>http://www.phparch.com/2010/04/new-sql-server-driver-released/</link>
		<comments>http://www.phparch.com/2010/04/new-sql-server-driver-released/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 15:00:10 +0000</pubDate>
		<dc:creator>Beth Tucker Long</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[pdo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5006</guid>
		<description><![CDATA[Microsoft recently announced their new PDO driver for SQL Server. The goal is to make it easier for developers to support multiple databases with their applications and to make it easier for popular PHP applications to offer a SQL server option.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/04/Microsoft-SQL-Server.jpg"><img src="http://www.phparch.com/files/2010/04/Microsoft-SQL-Server-e1272294843274-93x150.jpg" alt="" title="Microsoft-SQL-Server" width="93" height="150" class="alignleft size-thumbnail wp-image-5039" /></a>With the <a href="http://blogs.msdn.com/brian_swan/archive/2010/04/19/pdo-support-for-sql-server.aspx">release of SQL Server Driver for PHP 2.0 CTP</a> (CTP is Microsoft&#8217;s code word for Beta) which is <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=df4d9cc9-459c-4d75-a503-ae3fceb85860&amp;displaylang=en">available for download now</a>, SQL Server now includes  a PDO API—<a href="http://blogs.msdn.com/sqlphp/archive/2010/04/19/sql-server-driver-for-php-2-0-ctp-adds-php-s-pdo-style-data-access-for-sql-server.aspx">separate from the SQL Server native API, but sharing a common layer of core features</a>—which will allow PHP to use PDO to connect with SQL Server. The goal is to make it easier for developers to support multiple databases with their applications and to make it easier for popular PHP applications to offer a SQL server option. A shining example of this is a beta version of <a href="http://drupal.org/project/drupal">Drupal 7</a> running on SQL Server which was announced in tandem with the SQL Server PDO API at <a href="http://sf2010.drupal.org/">DrupalCon 2010</a>. Official word is that we will not see a release candidate for Drupal 7 until <a href="http://drupal.org/project/issues/search/drupal?version[0]=156281&amp;status[0]=1&amp;status[1]=8&amp;status[2]=13&amp;status[3]=14&amp;priorities[0]=1&amp;categories[0]=bug&amp;categories[1]=task">the issues queue</a> is empty, but there is an <a href="http://drupal.org/node/748690">alpha version</a> to play with to tide you over.</p>
<p>Microsoft is planning on releasing CTPs regularly, so be sure to send them feedback on their <a href="http://social.msdn.microsoft.com/Forums/en-US/sqldriverforphp/threads">SQL Server Driver for PHP forum</a> or by <a href="http://blogs.msdn.com/sqlphp/archive/2010/04/19/sql-server-driver-for-php-2-0-ctp-adds-php-s-pdo-style-data-access-for-sql-server.aspx">commenting on the team&#8217;s blog</a>. More information is available by visiting <a href="http://connect.microsoft.com/SQLServer">SQL Server’s Connect site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/04/new-sql-server-driver-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Oracle PHP Generator</title>
		<link>http://www.phparch.com/2010/04/oracle-php-generator/</link>
		<comments>http://www.phparch.com/2010/04/oracle-php-generator/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 14:15:15 +0000</pubDate>
		<dc:creator>Marco Tabini</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[code generation]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=4845</guid>
		<description><![CDATA[Is generating a PHP application to access a database a good development process?]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sqlmaestro.com/products/oracle/phpgenerator/"></a><a href="http://beta.phparch.com/wp-content/uploads/2010/04/sqlmaestro-logo3.gif"><img class="alignleft size-full wp-image-4851" title="sqlmaestro-logo" src="http://beta.phparch.com/wp-content/uploads/2010/04/sqlmaestro-logo3.gif" alt="" width="148" height="35" /></a><a href="http://www.sqlmaestro.com/products/oracle/phpgenerator">Oracle PHP Generator</a> is a tool from SQLMaestro which automatically generates a PHP user interface for Oracle databases. This generated code can run on any PHP 5 server with the necessary extensions. In its free version, the generator is capable of implementing all the basic features of database access such as querying, filtering and sorting of results, and even files upload.</p>
<h2>The basic idea</h2>
<p>Thanks to the wide support by hosting services, PHP can run nearly everywhere in the web and has a stable and high performance driver for Oracle databases.</p>
<p>This approach to user interface is sound: the Oracle development model prescribes to keep all the business logic in the database via its <a title="PL/SQL overview" href="http://en.wikipedia.org/wiki/PL/SQL">PL/SQL</a> language, an extension to the standard ANSI SQL. Every database vendor has its proprietary extensions to SQL, but Oracle and PL/SQL are famous for their extended set of features and expressive power. Similar PHP code generators are available for other database vendors, which often lack the necessary support for the encapsulation of business logic.</p>
<h2>Issues with generation approaches</h2>
<p>Programming without programming is an old idea and has never been a full success. In addition to the standard graphical customization, there are many aspects of the development of the user interface which deal with presentational logic, which does not belong to the database side and should be dealt with by the UI layer.</p>
<p>For example, the localization of dates and times in a format convenient to the end-user it&#8217;s a common case of presentational logic: the underlying representation in the database it&#8217;s always the same, but the data is translated for the sake of a smooth user experience. Oracle PHP Generator, at least in its full version, supports many of these caveats, but one can never be sure that the generated interface will support all the needed features. Generated code should never be modified by hand, due to the issue of keeping customizations during a subsequent regeneration (performed for example because of a change to the database schema.)</p>
<h2>The tool</h2>
<p>This particular execution of the UI generation idea is a bit off track. For example, the product runs only on Windows via an user interface. This makes it difficult to use it in a continuous integration cycle, or in any kind of automated process. The products of code generation have to be kept in sync with the back-end they refer to.</p>
<p>Of course Oracle PHP Generator is the right product for data-driven applications, which work mostly with CRUD and orthogonal requirements such as authentication and access control, and leverage the Oracle support for business logic in the persistence layer — if you happen to like it — avoiding unnecessary duplication. However, like all generated UI products, it shows its limits when it comes to support unusual features in the UI.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/04/oracle-php-generator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

