<?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>David Otton &#187; databases</title>
	<atom:link href="http://www.otton.org/tag/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.otton.org</link>
	<description>Look! Bunnies!</description>
	<lastBuildDate>Wed, 06 Jan 2010 14:32:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Link Roundup &#8211; Programming Links</title>
		<link>http://www.otton.org/2008/06/10/link-roundup/</link>
		<comments>http://www.otton.org/2008/06/10/link-roundup/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 23:35:07 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[links]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[unit tests]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.otton.org/2008/06/10/link-roundup/</guid>
		<description><![CDATA[I&#8217;m taking some time to tidy things up around here, so I&#8217;m coalescing a bunch of one-liners into a single post:

Smashing Magazine generates linkdump posts faster than I can digest them. This one from April 2008 on creative web form design is one of their best. Lots of inspiration there.
O&#8217;Reilly Radar&#8217;s Marc Hedlund on Code [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m taking some time to tidy things up around here, so I&#8217;m coalescing a bunch of one-liners into a single post:</p>
<ul>
<li>Smashing Magazine generates linkdump posts faster than I can digest them. This one from April 2008 on <a href="http://www.smashingmagazine.com/2008/04/17/web-form-design-modern-solutions-and-creative-ideas/">creative web form design</a> is one of their best. Lots of inspiration there.</li>
<li>O&#8217;Reilly Radar&#8217;s <a href="http://radar.oreilly.com/archives/2008/03/review-board-is-good-software.html">Marc Hedlund on Code Review Software</a>.</li>
<li><a title="Eventually Consistent by Werner Vogels" href="http://www.allthingsdistributed.com/2007/12/eventually_consistent.html"><span class="byline">Werner Vogels on Eventual Consistency</span></a>. If you&#8217;re concerned with database scaling and used to thinking in terms of ACID, there&#8217;s a lot to mull over here.</li>
<li><a title="Design Principles and Design Patterns" href="http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf">Design Principles and Design Patterns</a> is the clearest description of object composition I&#8217;ve ever read. Rather than the standard, 15-year-old &#8220;Fido&#8217;s a Dog, Dogs are Mammals, Mammals are Animals&#8221; object hierarchies you get in Introductory OO texts, it&#8217;s a short, readable explanation of how to design objects that are maintainable, extensible and loosely coupled. Really really good stuff.</li>
<li><a href="http://www.concept64.com/">A Neat Approach to Narrow Windows</a>. Concept 64&#8217;s clever way to deal with varying page widths is firmly grounded in usability. If the page width is &gt;800 pixels, the navigation links style themselves as a left-hand navigation menu. As the page width drops below 800 pixels the navigation links restyle themselves as tabs. Easy to do in Javascript by swapping CSS rules around, but a lot of thought has obviously gone into the design here. [It looks like the site's been taken down (<a href="http://web.archive.org/web/20070407210311/http://www.concept64.com/">wayback link, no javascript</a>). I'm keeping the link because I hope it comes back at some point.]</li>
<li><a href="http://www.peterbe.com/plog/google-latc">Peterbe&#8217;s experiences</a> at the 2006 <a href="http://www.peterbe.com/plog/google-latc2">Google London Automation Test Conference</a>. And&#8230; wow, I&#8217;m back to 2006 already. I sure don&#8217;t post much. Anyway, unit testing is one of those things that I desperately want to use in commercial projects, but when you say to management &#8220;I want to spend two weeks writing code that won&#8217;t make it into the final application&#8221; they get a funny look in their eye. Much the same thing happens when I start talking about user stories. Or the separation of presentation and business logic. Not that I&#8217;m bitter, or anything.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2008/06/10/link-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reminder to Self &#8211; MySQL, List stored procedures</title>
		<link>http://www.otton.org/2008/05/19/reminder-to-self-mysql-list-stored-procedures/</link>
		<comments>http://www.otton.org/2008/05/19/reminder-to-self-mysql-list-stored-procedures/#comments</comments>
		<pubDate>Mon, 19 May 2008 10:06:30 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.otton.org/2008/05/19/reminder-to-self-mysql-list-stored-procedures/</guid>
		<description><![CDATA[I just spent 10 minutes tracking down this particularly opaque MySQL command:

SHOW PROCEDURE STATUS

Followup. To list views:

SELECT * FROM information_schema.views

To list stored procedures and functions:

SELECT * FROM information_schema.routines

I really should have these bits and pieces committed to memory already, but as most of my job currently consists of fire-fighting in other peoples&#8217; code,  I [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent 10 minutes tracking down this particularly opaque MySQL command:</p>
<p><code>
<pre><span style="color: #993333; font-weight: bold;">SHOW</span> PROCEDURE <span style="color: #993333; font-weight: bold;">STATUS</span></pre>
<p></code></p>
<p>Followup. To list views:</p>
<p><code>
<pre><span style="color: #993333; font-weight: bold;">SELECT</span> * <span style="color: #993333; font-weight: bold;">FROM</span> information_schema.views</pre>
<p></code></p>
<p>To list stored procedures and functions:</p>
<p><code>
<pre><span style="color: #993333; font-weight: bold;">SELECT</span> * <span style="color: #993333; font-weight: bold;">FROM</span> information_schema.routines</pre>
<p></code></p>
<p>I really should have these bits and pieces committed to memory already, but as most of my job currently consists of fire-fighting in other peoples&#8217; code,  I don&#8217;t get to use sensible features like SPs and views very often.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2008/05/19/reminder-to-self-mysql-list-stored-procedures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note to self: don&#8217;t do this</title>
		<link>http://www.otton.org/2007/11/26/note-to-self-dont-do-this/</link>
		<comments>http://www.otton.org/2007/11/26/note-to-self-dont-do-this/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 14:06:40 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.otton.org/2007/11/26/note-to-self-dont-do-this/</guid>
		<description><![CDATA[ERROR 1116 (HY000): Too many tables; MySQL can only use 61 tables in a join
If you ever run into this MySQL error, something has gone badly wrong with your database schema. In this case, the database had no foreign key constraints, and I was trying to build a DELETE query that cascaded across ~230 tables. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><code>ERROR 1116 (HY000): Too many tables; MySQL can only use 61 tables in a join</code></p></blockquote>
<p>If you ever run into this MySQL error, something has gone badly wrong with your database schema. In this case, the database had no foreign key constraints, and I was trying to build a <code>DELETE</code> query that cascaded across ~230 tables. Not pretty at all.</p>
<p>It didn&#8217;t help that there was no documentation and no consistency in key names &#8211; <code>id, clientid, client, fkClient,</code> they all referred to the same key in different tables.</p>
<p>After a few false starts, I gave up on doing the deletes by hand; instead I went through the database creating the foreign key constraints that should have been there in the first place. It&#8217;s the same amount of work, I end up with a slightly saner database (always leave the codebase better than you found it), and doing the delete becomes a simple &#8220;delete clientid&#8221;, which cascades through the rest of the tables removing related data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2007/11/26/note-to-self-dont-do-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
