<?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>Michael Schuerig &#187; Database</title>
	<atom:link href="http://www.schuerig.de/michael/blog/index.php/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.schuerig.de/michael/blog</link>
	<description>Sentenced to making sense</description>
	<lastBuildDate>Tue, 06 Sep 2011 07:21:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Creative Associations</title>
		<link>http://www.schuerig.de/michael/blog/index.php/2009/05/29/creative-associations/</link>
		<comments>http://www.schuerig.de/michael/blog/index.php/2009/05/29/creative-associations/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:01:58 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.schuerig.de/michael/blog/?p=62</guid>
		<description><![CDATA[A presentation I held on May 28 at Düsseldorf on Rails about interesting and useful things you can do with ActiveRecord, SQL, and a smart database. german english .]]></description>
			<content:encoded><![CDATA[<p>A presentation I held on May 28 at <a href="http://groups.google.de/group/duesseldorf-on-rails">Düsseldorf on Rails</a> about interesting and useful things you can do with <tt>ActiveRecord</tt>, <tt>SQL</tt>, and a smart database.</p>
<ul>
<li><a href="http://www.schuerig.de/michael/pres/kreative-assoziationen/index.html">german</a></li>
<li><a href="http://www.schuerig.de/michael/pres/kreative-assoziationen/index.html.en">english</a></li>
</ul>
<p>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.schuerig.de/michael/blog/index.php/2009/05/29/creative-associations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No database to rule them all. Branch databases for Rails and git</title>
		<link>http://www.schuerig.de/michael/blog/index.php/2009/04/09/branch-db/</link>
		<comments>http://www.schuerig.de/michael/blog/index.php/2009/04/09/branch-db/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 23:04:37 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.schuerig.de/michael/blog/?p=59</guid>
		<description><![CDATA[You&#8217;re using git to manage your Ruby on Rails projects? Then you&#8217;ve probably come to appreciate topic branches as a kind of transaction facility for programmers. If you need to implement a non-trivial or just try something, the way to go is onto a new &#8220;topic&#8221; branch. There you can mangle the code all you [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re using <em><code>git</code></em> to manage your <em>Ruby on Rails</em> projects? Then you&#8217;ve probably come to appreciate topic branches as a kind of transaction facility for programmers. If you need to implement a non-trivial or just try something, the way to go is onto a new &#8220;topic&#8221; branch. There you can mangle the code all you like, without fearing to cause any lasting harm. In case everything works out fine, you merge the branch into the master branch and discard it. If you come to a dead end &#8212; well, you <em>just</em> discard the misbegotten branch.</p>
<p>But what about the database? If moving along your branch involves changes to the database, structural changes in particular, you can&#8217;t easily switch to another branch without these changes. In other words, your development database is really only suitable for a single branch.</p>
<p>Up to now, that is. Install the <code>branch_db</code> gem and what you get is a private database for your branch that you can mutilate without interfering with work on the other branches.</p>
<p>For details and installation instructions see the <a href="http://github.com/mschuerig/branch_db/blob/master/README.rdoc">README</a>. Here&#8217;s just an appetizer. Say you&#8217;re on branch &#8220;feature&#8221; and want a private copy of the &#8220;master&#8221; database. Here&#8217;s how you do it:</p>
<p><code>
<pre>
$ rake db:branches:copy ORIG_BRANCH=master
</pre>
<p></code></p>
<h2>Getting it</h2>
<ul>
<li><a href="http://github.com/mschuerig/branch_db">github</a></li>
<li>$ sudo gem install mschuerig-branch_db</li>
</ul>
<h2>Let your Rails app know about it</h2>
<p>In the appropriate place in <code>config/environment.rb</code> add</p>
<p><code>
<pre>
config.gem "mschuerig-branch_db", :lib =&gt; 'branch_db'
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.schuerig.de/michael/blog/index.php/2009/04/09/branch-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emperor Ming strikes back</title>
		<link>http://www.schuerig.de/michael/blog/index.php/2008/05/04/celko-thinking-in-sets/</link>
		<comments>http://www.schuerig.de/michael/blog/index.php/2008/05/04/celko-thinking-in-sets/#comments</comments>
		<pubDate>Sun, 04 May 2008 00:17:35 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://schuerig.de/michael/blog/index.php/2008/05/04/celko-thinking-in-sets/</guid>
		<description><![CDATA[Emperor Ming strikes back May 5, 2008by Michael Schürigproduct Joe Celko&#8217;s Thinking in Sets &#9733;&#9733;&#9733;&#9734;&#9734; I have (read) copies of five earlier of Celko&#8217;s books on my shelf, still I am again amazed by the cultural distance. Most of my programming life I have spent with object-oriented programming languages and associated technologies. Thus, when Celko [...]]]></description>
			<content:encoded><![CDATA[<p>Emperor Ming strikes back</p>
<div class="hreview" id=""><abbr class="dtreviewed" title="2008-05-05T00:00">May 5, 2008</abbr>by <span class="reviewer vcard"><span class="fn">Michael Schürig</span></span><span class="type">product</span>
<div class="item"><span class="fn">Joe Celko&#8217;s Thinking in Sets</span></div>
<p><abbr title="3" class="rating">&#9733;&#9733;&#9733;&#9734;&#9734;</abbr></div>
<p>I have (read) copies of five earlier of Celko&#8217;s books on my shelf, still I am again amazed by the cultural distance. Most of my programming life I have spent with object-oriented programming languages and associated technologies. Thus, when Celko starts the present book with a discussion of the differences between flat files and relational databases, it could hardly be more distant than if he had extolled the virtues of the gasoline engine over its steam predecessor.</p>
<p>Celko likes to refer to his informers as &#8220;Mr. So-and-so, working for company X&#8221; this again moves the cultural differences to the front, and I can&#8217;t avoid a slight chuckle when he reverently cites &#8220;Dr. E.F. Codd&#8221; for the umpteenth time. It all decidedly feels like a tale from an imaginary 1950s. I certainly envision people in lab coats.</p>
<p>The tone moves from enjoyably quaint to annoying, when Celko (again and again) ridicules the many failings of database novices and sophomores. He might not realize that those who share in the joke have no need to read his book &#8212; and that those who bought the book to learn something from it may feel a wee bit offended. After all, we are already aware that there&#8217;s something we don&#8217;t know yet and want to learn, there&#8217;s really no need to rub it in.</p>
<p>So much for the atmospheric stuff. But, of course, I didn&#8217;t buy this book to make me feel good, but to learn something, come rain or shine. And, yes, there is a lot useful stuff in this book. More in the bits and pieces than in some generalized approach. And by far more in line with the subtitle, &#8220;Auxiliary, Temporal and Virtual Tables in SQL&#8221; than with &#8220;Thinking in Sets&#8221;, the main title. Regarding the latter, I found the most worthwhile part of the book to be the discussion of why boolean flags are bad (ch. 11, Thinking in SQL).</p>
<p>Celko&#8217;s effort to distance the relational, set-based approach from earlier practices crops up all over the book. I had expected &#8212; and hoped! &#8212; that Celko would put considerably energy into comparing, contrasting, and hopefully complementing set-based thinking with current object-oriented approaches. Alas, he&#8217;s completely preoccupied with his own tradition and doesn&#8217;t wander into OO-land at all.</p>
<p>I would have been very interested in reading a knowledgable discussion of where to draw the line between procedural and set-based approaches. And, as most practical programs will employ both of these approaches, how to interface the respective parts. On the latter issue, there&#8217;s not a single word in this book. The treatment of the former issue is interesting, in a twisted sense. Celko demonstrates some string processing in SQL and concedes that this would be much easier in languages such as ICON or SNOBOL, those stalwarts of 1970s era dataprocessing (does he even know Perl?). Well, why then try to abuse SQL to do something for which it is ill-suited and results in bloated code? Why anyone would want to solve Sudoku puzzles in SQL I cannot fathom, either. Celko doesn&#8217;t tell, and neither does he present the whole (repetitive) code, nor explain how the set-based approach works in any sufficient detail.</p>
<p>The overarching mindset exemplified in this book is to push as much into the database as possible, even if it hurts at times. I don&#8217;t mean to denigrade the intention, namely application-independent, consistent data storage. However, the reality in current software engineering is that a shared database is but one solution among others. For instance, SOA (Service Oriented Architecture) is specifically about connecting applications through services they provide, not by tying them to a shared database.</p>
<p>Celko likes to style himself in the image of Ming the Merciless. The semblance is indeed uncanny and as I hinted already, he tries to live up to the role as his author persona. Unfortunately, he doesn&#8217;t seem to realize that there&#8217;s one thing that can&#8217;t be tolerated in an arch-villain (as well as in his henchmen and henchwomen): sloppiness. The book has more than its fair share of typos and grammatical accidents. A particularly amusing case in point &#8212; due to his belligerent character, a deeper insight, or simply search-and-replace gone awry &#8212; is an example that consistently refers to &#8220;martial status&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.schuerig.de/michael/blog/index.php/2008/05/04/celko-thinking-in-sets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

