<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
	<ttl>15</ttl>
	<title>Contraflo</title>
	<link>http://www.contraflo.co.uk/articles/</link>
	<description>News and Resources to Get More from Your Computer</description>
	<pubDate>Sun, 20 May 2012 18:46:59 +0100</pubDate>
	<lastBuildDate>Sun, 20 May 2012 18:46:59 +0100</lastBuildDate>
	<generator>www.eggblog.net</generator>
	<item>
		<title>Fan Traps</title>
		<link>http://www.contraflo.co.uk/articles/Fan-Traps-15.htm</link>
		<description>&lt;p&gt;&lt;b&gt;Introduction&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;As my &lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;Fan-Traps-and-Chasm-Traps-13.htm&quot;&gt;previous article&lt;/a&gt; alluded, much of the information found 
on the Web about Chasm Traps and Fan Traps is in-complete, very 
specific, or simply too brief.&lt;/p&gt;

&lt;p&gt;In this article on Fan Traps I hope to provide more generic examples 
and specifically provide supporting SQL scripts that you can play with 
and try to resolve yourself.&lt;/p&gt;



&lt;p&gt;&lt;i&gt;An understanding of Dimensions and Measure is useful at this point but not required.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;So what is a Fan Trap?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Don&apos;t worry if this part doesn&apos;t make sense at first, that&apos;s what the examples are for.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;A Fan Trap is so called because the tables and their relationships Fan Out&apos;.&lt;/p&gt;
&lt;p&gt;The most common example of this is 3 tables joined from left to right
 with 2 one-to-many joins between them, something like this (shoddy) 
diagram:&lt;/p&gt;

&lt;p&gt;                                    &lt;img alt=&quot;&quot; src=&quot;photos/uploads/Diagram1.jpg&quot; border=&quot;0&quot; hspace=&quot;&quot; vspace=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;The diagram shows a Range table, an Item table and a weekly sales 
table.  Each Range has many Items and each Item may have sold in 1 or 
more calendar weeks.&lt;/p&gt;

&lt;p&gt;At first you may be asking what&apos;s wrong with those table 
relationships?, and the answer is nothing.  There is nothing wrong with
 the relationships in the diagram, and this is why it&apos;s called a trap as
 there may be nothing obviously wrong.&lt;/p&gt;

&lt;p&gt;To understand why the relationships are a Fan Trap, we need to look 
at how the data in those tables might be used to calculate aggregate 
figures.  For example a problem occurs when we attempt to include the 
number of items per Range with the total sales of said items in a single
 report/result set.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Example &lt;/b&gt;&lt;i&gt;(scripts available from the &lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;/downloads.php&quot;&gt;downloads area&lt;/a&gt;)&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Assume the Tables have the following data and structures:&lt;/p&gt;

&lt;table prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; &lt;b&gt;Range&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; &lt;b&gt;Rangedesc&lt;/b&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 1
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Toys
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 2
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Books
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 3
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; DVDs
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt; &lt;br&gt;&lt;br&gt;
&lt;table prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; &lt;b&gt;Item&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; &lt;b&gt;Itemdesc&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; &lt;b&gt;Range&lt;/b&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 1
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Ball
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 1
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 2
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Teddy   Picnic
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 2
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 3
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Lion   King
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 3
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 4
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Bat
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 1
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 5
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Pets   Book
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 2
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 6
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Shrek
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 3
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;
&lt;table prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; &lt;b&gt;Wk&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; &lt;b&gt;Item&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; &lt;b&gt;Sales&lt;/b&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200901
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 1
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200901
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 2
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200901
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 3
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 30
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200902
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 4
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200902
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 5
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200902
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 6
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 30
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200903
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 1
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200903
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 2
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200903
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 3
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200904
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 4
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 10
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200904
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 5
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 200904
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; 6
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 30
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The SQL to find out how many items are in each range could look like this:&lt;/p&gt;
&lt;pre class=&quot;prettyprint lang-sql&quot;&gt;&lt;p&gt;SELECT&lt;br&gt;      r.Rangeno,&lt;br&gt;      r.Rangedesc,&lt;br&gt;      COUNT(Item) AS ItemCount&lt;br&gt;FROM&lt;br&gt;      Range AS r&lt;br&gt;      INNER JOIN Item AS i&lt;br&gt;             ON r.Rangeno = i.Rangeno&lt;br&gt;GROUP BY&lt;br&gt;      r.Rangeno,&lt;br&gt;      r.Rangedesc&lt;/p&gt;&lt;/pre&gt;

&lt;p&gt;The Result set looking like this:&lt;/p&gt;

&lt;table prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; &lt;b&gt;Rangeo&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; &lt;b&gt;Rangedesc&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; &lt;b&gt;ItemCount&lt;/b&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 1
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Toys
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 2
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 2
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Books
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 2
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 3
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; DVDs
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 2
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The SQL to find out total sales per Item could look like this:&lt;/p&gt;
&lt;pre class=&quot;prettyprint lang-sql&quot;&gt;&lt;p&gt;SELECT&lt;br&gt;    i.Item,&lt;br&gt;    i.Itemdesc,&lt;br&gt;    SUM(s.Sales) AS TotalSales&lt;br&gt;FROM&lt;br&gt;    Item AS i&lt;br&gt;    INNER JOIN WeeklySales AS s&lt;br&gt;        ON i.item = s.Item&lt;br&gt;GROUP BY&lt;br&gt;    i.item,&lt;br&gt;    i.Itemdesc&lt;br&gt;&lt;/p&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;The Result Set:&lt;/p&gt;

&lt;table prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; &lt;b&gt;Item&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; &lt;b&gt;Itemdesc&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; &lt;b&gt;TotalSales&lt;/b&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 1
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Ball
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 2
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Teddy   Picnic
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 40
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 3
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Lion   King
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 60
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 4
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Bat
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 20
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 5
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Pets   Book
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 40
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 6
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Shrek
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 60
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;So far you will have noticed that everything is correct, none of our figures are negatively impacted. &lt;/p&gt;

&lt;p&gt;Now lets say that a Manager wants to see each Range, the number of Items in a Range and the Total Sales of all Items in a Range.&lt;/p&gt;
&lt;p&gt;We could use the below SQL statement to achieve this.&lt;/p&gt;

&lt;pre class=&quot;prettyprint lang-sql&quot;&gt;&lt;p&gt;SELECT&lt;br&gt;       r.Rangeno,&lt;br&gt;       r.Rangedesc,&lt;br&gt;       COUNT(Item) AS ItemCount,&lt;br&gt;       SUM(s.Sales) AS TotalSales&lt;br&gt;FROM&lt;br&gt;       Range AS r&lt;br&gt;       INNER JOIN Item AS i&lt;br&gt;              ON r.Rangeno = i.Rangeno&lt;br&gt;       INNER JOIN WeeklySales AS s&lt;br&gt;              ON i.item = s.Item&lt;br&gt;GROUP BY&lt;br&gt;       r.Rangeno,&lt;br&gt;       r.Rangedesc&lt;br&gt; &lt;/p&gt;&lt;/pre&gt;
&lt;p&gt;The Result Set:&lt;/p&gt;

&lt;table prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; &lt;b&gt;Rangeno&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; &lt;b&gt;Rangedesc&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; &lt;b&gt;ItemCount&lt;/b&gt;
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; &lt;b&gt;TotalSales&lt;/b&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 1
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Toys
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 4
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 40
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 2
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; Books
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 4
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 80
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;91&quot;&gt; 3
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;120&quot;&gt; DVDs
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 4
&lt;/td&gt;
&lt;td prevstyle=&quot;border: 1px dashed #AAAAAA;&quot; style=&quot;border: 1px dashed #AAAAAA;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt; 120
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The above Result Set is incorrect.  Although the SQL is completely 
valid and successfully executes returning results, the results are 
incorrect.&lt;/p&gt;

&lt;p&gt;As we identified from our previous query, the ItemCount for our 3 
Ranges should be 2, not 4 as shown above.  This is caused by the Fan 
Trap.&lt;/p&gt;

&lt;p&gt;As you may have spotted from the SQL statement, the issue is that we 
are aggregating the Item table and the WeeklySales table, however both 
are at different aggregate levels to begin with.&lt;/p&gt;

&lt;p&gt;Simple solution is to use COUNT(DISTINCT(Item)).  Another solution 
would be to perform separate aggregate queries and join the Result Sets 
together:&lt;/p&gt;

&lt;pre class=&quot;prettyprint lang-sql&quot;&gt;&lt;p&gt;SELECT&lt;br&gt;       r.Rangeno,&lt;br&gt;       r.Rangedesc,&lt;br&gt;       i.ItemCount,&lt;br&gt;       s.TotalSales&lt;br&gt;FROM&lt;br&gt;       FAN_Range AS r&lt;br&gt;       INNER JOIN (&lt;br&gt;                     SELECT&lt;br&gt;                           i.Rangeno,&lt;br&gt;                           COUNT(i.Item) AS ItemCount&lt;br&gt;                     FROM&lt;br&gt;                           FAN_Item AS i&lt;br&gt;                     GROUP BY&lt;br&gt;                           i.Rangeno&lt;br&gt;              ) AS i&lt;br&gt;              ON r.Rangeno = i.Rangeno&lt;br&gt;       INNER JOIN (&lt;br&gt;                     SELECT&lt;br&gt;                           i.Rangeno,&lt;br&gt;                           SUM(s.Sales) AS TotalSales&lt;br&gt;                     FROM&lt;br&gt;                           FAN_Item AS i&lt;br&gt;                           INNER JOIN FAN_WeeklySales AS s&lt;br&gt;                                  ON i.Item = s.Item&lt;br&gt;                     GROUP BY&lt;br&gt;                           i.Rangeno&lt;br&gt;              ) AS s&lt;br&gt;              ON r.Rangeno = s.Rangeno&lt;/p&gt;&lt;/pre&gt;

&lt;p&gt;Both are easy if you are hand coding SQL for reports and data 
requests, in-fact I suspect many professionals would know the data and 
automatically write the correct queries working around the Fan Trap 
issues without even thinking about it. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Why you need to know about Fan Traps?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Although you may well already work around Fan Traps in your hand 
coded SQL, its still worth while having an understanding of them so that
 you can identify them faster, and actually start trying to avoid them. &lt;/p&gt;
&lt;p&gt;The examples here are very simplistic, but as queries get complicated
 joining various tables, knowledge of Fan Traps can help you avoid 
becoming a victim of them even when on first run the query appears to 
perform as expected.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Perhaps a bigger issue is that most off the shelf Reporting Tools 
(Business Objects etc.) generate SQL statements based on data models 
(eg. BO Universes), and therefore need to be told how to manage Fan 
Traps.&lt;/p&gt;
&lt;p&gt;Without a good understanding of Fan Traps a data model could be 
designed that passes preliminary testing, but later gets caught out 
providing erroneous figures.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Solutions&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;As shown above, if you are in complete control of the SQL Query the solution is straight forward.&lt;/p&gt;

&lt;p&gt;Data model solutions are a little tricky as the solution can depend entirely on your data model and the reporting software used.&lt;/p&gt;
&lt;p&gt;The key is to be consistent in your approach to aggregates, ensuring you define aggregates for all measures.&lt;/p&gt;
&lt;p&gt;Also where possible define aggregate priorities.  In some cases an 
aggregate could be calculated in multiple ways, define them and the 
priority.&lt;/p&gt;

&lt;p&gt;Unfortunately it would be impossible to list solutions to every 
scenario here, but the key is if you have an understanding of Fan Traps 
you can solve them or work around them in your given situation.&lt;/p&gt;

&lt;p&gt;&lt;b&gt; &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Hopefully by now you have a better understanding of Fan Traps, and are better equipped to deal with them.&lt;/p&gt;
&lt;p&gt;If you have any questions, about the Article, please leave a comment 
and I will try to get back to you, or alternatively, get in contact via 
the &lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;/contact.php&quot;&gt;Contact&lt;/a&gt; page.&lt;/p&gt;

&lt;p&gt;Remember to check out the resource links from the &lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;Fan-Traps-and-Chasm-Traps-13.htm&quot;&gt;Fan and Chasm Traps Article&lt;/a&gt;.&lt;/p&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=15</guid>
		<pubDate>Wed, 15 Sep 2010 17:29:01 +0100</pubDate>
	</item>
	<item>
		<title>PCI-Express Scaling 1.x vs 2.x</title>
		<link>http://www.contraflo.co.uk/articles/PCI-Express-Scaling-1.x-vs-2.x-14.htm</link>
		<description>&lt;P&gt;&lt;EM&gt;&quot;Will my motherboard only supporting PCI-E 1.1 be a limiting factor, and if so by how much?&quot;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Thanks to a faulty driver from NVidia (196.75) overheating my graphics card (9800GTX) I am now in the market for a new one.  &lt;BR&gt;As many of my friends and colleagues know I like to spend time making sure I am getting the best I can for my budget.  What this means is I will spend hours scouring the internet and magazines for reviews, articles and specifications, eventually making a choice.&lt;/P&gt;
&lt;P&gt;This time round I do not have the luxary of time on my side, however it hasnt stopped me from doing a good bit of research, and one of the questions I had was will my motherboard only supporting PCI-E 1.1 be a limiting factor, and if so by how much?&lt;/P&gt;
&lt;P&gt;By far and away the best article I could find on this was one from techPowerUp:&lt;BR&gt;&lt;A href=&quot;http://www.techpowerup.com/reviews/AMD/HD_5870_PCI-Express_Scaling/&quot; name=&quot;&quot; target=&quot;&quot; className&gt;AMD Radeon HD 5870 PCI-Express Scaling&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The short answer is that the performance difference between a PCI-E 1.x 16x port and a PCI-E 2.x 16x port would work out at about 2%, and as PCI-E is backwards and forwards compatible for me its not an issue.  &lt;/P&gt;
&lt;P&gt;The article is definitely worth a read, especially if you have PCI-E 2.0 and even more so if your looking at a Crossfire setup.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=14</guid>
		<pubDate>Sun, 07 Mar 2010 20:41:32 +0000</pubDate>
	</item>
	<item>
		<title>Fan Traps and Chasm Traps</title>
		<link>http://www.contraflo.co.uk/articles/Fan-Traps-and-Chasm-Traps-13.htm</link>
		<description>
&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ok, hopefully anyone working in the realm of MIS and BI should have an understanding of what a Fan Trap and Chasm Trap is, unfortunately I suspect that there are a lot of professionals who don&apos;t... or do they?&lt;/p&gt;
&lt;p&gt;There are various sources (specifically on the net) that seem to provide only very brief explanations, often leading to an ambiguous understanding based on a very specific scenario.&lt;/p&gt;
&lt;p&gt;In my experience the areas that make the most reference to Relationship Traps are ER Modelling and Business Objects Universe Design.&lt;/p&gt;
&lt;p&gt;This means that if you have never designed a Business Objects Universes or had any formal training in ER Modelling you may never have come across the terms, except perhaps in passing.&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;What&apos;s so important about them?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;In ER and Data Modelling, you need to be aware of Relationship traps primarily so that you can avoid them in your design in the first place.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;I suspect that most professionals in that sort of role already resolve the Traps at design, without actually recognising them as either Fan or Chasm Traps, especially the Chasm Traps (for reasons that will become obvious in my Chasm Trap article).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;In Business Objects Universe design, not being aware of the traps could lead to significant statistical errors in the reports based on them, especially if those responsible for the report creation assume the Universes are correct.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;Overall, in any situation where data is extracted from a Relational database to gather meaningful information, not being aware of the Traps can cause significant issues.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;I work with Relational Databases and have never heard of them?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;I suspect that anyone that hand codes SQL to extract information from a Relational Database is probably already aware of the pitfalls of the traps, and how to work around them... you just don&apos;t know them by that name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;This may sound odd, but Fan Traps and Chasm Traps are just putting a name to a problem.&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;That problem existed before it got given a name, so you may well have experienced and addressed, and continue to address the problem yourself, without actually giving it a name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;So what next and why do I need to know?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;As I pointed out above, you may already be aware of the Traps and be resolving them as you come across them, however ideally you would know and understand them for what they are and actively look to resolve them while designing databases and producing meaningful information from that data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;You can read my Article on Fan Traps here: &lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;Fan-Traps-15.htm&quot;&gt;Fan Traps&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;You can read my Article on Chasm Traps here: coming soon&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &apos;Arial&apos;,&apos;sans-serif&apos;; font-size: 11pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p style=&quot;margin: 0cm 0cm 0pt;&quot; class=&quot;MsoNormal&quot;&gt;Below is a list of sites I found &apos;useful&apos; information on the traps from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;http://www.dagira.com/presentations/2004/BONYMAUG.zip&quot;&gt;Presentation by Dave Rathbun&lt;/a&gt; (Very Business Objects oriented, but with many useful examples.) 
&lt;/li&gt;&lt;li&gt;&lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;http://en.wikipedia.org/wiki/Relational_model#Modelling_issues&quot;&gt;Wikipedia Article on Relation Modeling&lt;/a&gt; 
&lt;/li&gt;&lt;li&gt;&lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;http://biguru.wordpress.com/2008/05/01/its-all-in-the-universe-handling-chasm-and-fan-traps/&quot;&gt;Article by Maloy Manna&lt;/a&gt; (Useful info although lacking in complete examples.) 
&lt;/li&gt;&lt;li&gt;&lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;http://db.grussell.org/section005.html#_Toc67114416&quot;&gt;ER Modelling Lecture Slides by Dr Gordon Russell&lt;/a&gt; (Quiet brief and not as clear as it could be.) 
&lt;/li&gt;&lt;li&gt;&lt;a name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot; class=&quot;&quot; href=&quot;http://hubpages.com/hub/Chasm_and_Fan_traps&quot;&gt;Hubpages articles by BusinessObjects&lt;/a&gt; (Unfortunately a very brief definition.)&lt;/li&gt;&lt;/ul&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=13</guid>
		<pubDate>Thu, 04 Feb 2010 17:19:36 +0000</pubDate>
	</item>
	<item>
		<title>Baby Smash! - baby proof computer fun</title>
		<link>http://www.contraflo.co.uk/articles/Baby-Smash%21-baby-proof-computer-fun-12.htm</link>
		<description>&lt;P&gt;Babysmash! is a program by &lt;A href=&quot;http://www.hanselman.com/&quot; name=&quot;&quot; target=&quot;&quot; className&gt;Scott Hanselman&lt;/A&gt; that allows you to have fun with your little one on the computer, the main feature being they cant break anything.&lt;A href=&quot;http://www.hanselman.com/babysmash/&quot;&gt;&lt;IMG class=inimgright alt=BabySmash! src=&quot;photos/uploads/BabySmash.png&quot;&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The idea is really simple.  Babysmash! locks out all the usual keys and shortcuts on your computer, only allowing Ctrl-Alt-O to bring up the options or Alt-F4 to quit the application.  &lt;/P&gt;
&lt;P&gt;Any other keypress displays a smiley letter or shape on the screen, with either some laughter or talking describing the letters and shapes, although the talking is very computerised.&lt;/P&gt;
&lt;P&gt;Babysmash! is totally free and simple to install, the only catch is that it&apos;s Windows only.  I&apos;d also recommend that you let them loose on a spare, preferably old keyboard, as once they get started, the emphasis is on the word &lt;STRONG&gt;Smash!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You can find Babysmash on Scott&apos;s site: &lt;A href=&quot;http://www.hanselman.com/babysmash/&quot;&gt;http://www.hanselman.com/babysmash/&lt;/A&gt;&lt;/P&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=12</guid>
		<pubDate>Sun, 01 Nov 2009 20:53:45 +0000</pubDate>
	</item>
	<item>
		<title>SQL - A bit about Nested Joins</title>
		<link>http://www.contraflo.co.uk/articles/SQL-A-bit-about-Nested-Joins-11.htm</link>
		<description>&lt;P&gt;I have maintained/re-written legacy code in every stage of my career to date and I cant see that stopping in the future.&lt;/P&gt;
&lt;P&gt;Quite a few times I have found stored procedures and views, with badly formatted nested joins and absolutly no comments. &lt;BR&gt;If you have never come across nested joins before, keep reading and I will try to cover a basic example below and how to de-mystify it.&lt;/P&gt;
&lt;P&gt;Lets look at nicely formatted and VERY basic example of a nested join (real examples can be alot more complicated):&lt;/P&gt;&lt;PRE class=&quot;prettyprint lang-sql&quot;&gt;SELECT&lt;BR&gt;   *&lt;BR&gt;FROM&lt;BR&gt;   tb1 &lt;BR&gt;   LEFT JOIN tb2&lt;BR&gt;        ON tb1.c1 = tb2.c1 &lt;BR&gt;   RIGHT JOIN tb3 &lt;BR&gt;        LEFT JOIN tb4 &lt;BR&gt;                ON tb3.c1 = tb4.c1 &lt;BR&gt;        ON tb1.c1 = tb3.c1&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;The first thing I do when I see a nested join is add parenthesis, which makes the above look like this:&lt;/P&gt;&lt;PRE class=&quot;prettyprint lang-sql&quot;&gt;SELECT&lt;BR&gt;   *&lt;BR&gt;FROM&lt;BR&gt;   tb1 &lt;BR&gt;   LEFT JOIN tb2&lt;BR&gt;        ON tb1.c1 = tb2.c1 &lt;BR&gt;   RIGHT JOIN (tb3 &lt;BR&gt;        LEFT JOIN tb4 &lt;BR&gt;                ON tb3.c1 = tb4.c1) AS tb3 &lt;BR&gt;        ON tb1.c1 = tb3.c1&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;From my point of view, the whole thing makes a lot more sense now, although to be honest the nested join just looks like a derrived table now with a missing &apos;select *&apos;... which would look like:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;PRE class=&quot;prettyprint lang-sql&quot;&gt;SELECT&lt;BR&gt;   *&lt;BR&gt;FROM&lt;BR&gt;   tb1 &lt;BR&gt;   LEFT JOIN tb2&lt;BR&gt;        ON tb1.c1 = tb2.c1 &lt;BR&gt;   RIGHT JOIN (&lt;BR&gt;        SELECT *&lt;BR&gt;        FROM tb3&lt;BR&gt;        LEFT JOIN tb4 &lt;BR&gt;                ON tb3.c1 = tb4.c1) AS tb3 &lt;BR&gt;        ON tb1.c1 = tb3.c1&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It might just be me, but the above looks infinitely more readable than the first example, even with the extra code?&lt;BR&gt;Having said that, without a WHERE clause the derived table isnt really doing much.  Lets get rid of the nested join/derived table and the extra code and see what it looks like:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;PRE class=&quot;prettyprint lang-sql&quot;&gt;SELECT&lt;BR&gt;   *&lt;BR&gt;FROM&lt;BR&gt;   tb1 &lt;BR&gt;   LEFT JOIN tb2&lt;BR&gt;        ON tb1.c1 = tb2.c1 &lt;BR&gt;   RIGHT JOIN tb3&lt;BR&gt;        ON tb1.c1 = tb3.c1&lt;BR&gt;   LEFT JOIN tb4 &lt;BR&gt;        ON tb3.c1 = tb4.c1&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Much better!  Now the final step is to remove that silly RIGHT JOIN (Silly? read my take &lt;A href=&quot;SQL-RIGHT-%28OUTER%29-JOIN-4.htm&quot; name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot;&gt;RIGHT JOINS&lt;/A&gt;):&lt;/P&gt;&lt;PRE class=&quot;prettyprint lang-sql&quot;&gt;SELECT&lt;BR&gt;   *&lt;BR&gt;FROM&lt;BR&gt;   tb3 &lt;BR&gt;   LEFT JOIN tb4&lt;BR&gt;        ON tb3.c1 = tb4.c1 &lt;BR&gt;   LEFT JOIN tb1&lt;BR&gt;        ON tb3.c1 = tb1.c1&lt;BR&gt;   LEFT JOIN tb2 &lt;BR&gt;        ON tb1.c1 = tb2.c1&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Perfect! (even if I do say so myself)  The final result is a nicely formatted sql select, that most sql programmers should be able to quickly read and understand.&lt;/P&gt;
&lt;P&gt;As this example shows, theres really no such thing as a nested join, either your using a derived table (which is pretty pointless without a where clause) or you are just writing your SQL in a different way.&lt;/P&gt;
&lt;P&gt;I hope this helps a little, however as always get in contact if you have any questions/comments.&lt;/P&gt;
&lt;P&gt;UPDATE: I have added a more detailed example sql script on the &lt;A href=&quot;/downloads.php&quot;&gt;Downloads&lt;/A&gt; page.&lt;BR&gt;&lt;/P&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=11</guid>
		<pubDate>Sun, 11 Oct 2009 16:44:10 +0100</pubDate>
	</item>
	<item>
		<title>Spotify - A world of music. Instant, simple and free.</title>
		<link>http://www.contraflo.co.uk/articles/Spotify-A-world-of-music.-Instant%2C-simple-and-free.-10.htm</link>
		<description>&lt;P&gt;In my constant search to get more from the Internet for free (and without breaking any copyright laws etc.) I have come across a little gem.&lt;/P&gt;
&lt;P style=&quot;MARGIN-RIGHT: 0px&quot; dir=ltr&gt;&lt;A href=&quot;http://www.spotify.com/&quot; name=&quot;&quot; target=&quot;&quot; className&gt;Spotify&lt;/A&gt; is a music streaming application for your computer, but what makes it very clever is that the streaming is virtually instant.&lt;A href=&quot;http://www.spotify.com/&quot;&gt;&lt;IMG class=inimgright title=Spotify border=0 alt=Spotify src=&quot;photos/uploads/Spotifyscreenshot.png&quot;&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Using the application is like using iTunes except you have an absolutely massive (3.8 million tracks according to &lt;A href=&quot;http://en.wikipedia.org/wiki/Spotify#Features&quot; name=&quot;&quot; target=&quot;&quot; className&gt;wikipedia&lt;/A&gt;) Library of songs at your disposal.&lt;BR&gt;Searching for the songs you want is quick and straight forward, you simply type in any part of the artists name or track title and a list of various matches appear and can be played instantly.&lt;/P&gt;
&lt;P&gt;The playlist feature is fantastic and really adds to the applications useability.  Just like iTunes you can add any of the tracks into whatever playlists you want, mixing artists as you see fit.&lt;BR&gt;Whats more is that these playlists can be shared using sites such as &lt;A href=&quot;http://www.spotyshare.com/&quot;&gt;http://www.spotyshare.com/&lt;/A&gt; and you can even invite other users to add/remove songs from your playlists by marking them as collaborative.&lt;/P&gt;
&lt;P&gt;Spotify is supported by ads (theres always a catch) in its free version, but they dont pop up to often and only last about 30 seconds, so its a little like radio (but no DJ&apos;s).&lt;BR&gt;There is a Premium subscription at &#163;9.99 per month which removes all ads and also provides access to certain content before its made available to free users.&lt;/P&gt;
&lt;P&gt;Another great option is the Day Pass.  For only 99p you can have 24hrs of ad free music.  This option is perfect if you are throwing a party and want to provide the Music through your very own playlist, it also means that which ever direction the party takes, you can find the music to match the mood.&lt;/P&gt;
&lt;P&gt;I am really impressed by the service offered by Spotify and the features it provides out of the Box and although it might not be for everyone I whole heartedly recommend you give it a look.&lt;/P&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=10</guid>
		<pubDate>Thu, 27 Aug 2009 20:29:53 +0100</pubDate>
	</item>
	<item>
		<title>Steam Offer - Trackmania United Forever</title>
		<link>http://www.contraflo.co.uk/articles/Steam-Offer-Trackmania-United-Forever-9.htm</link>
		<description>&lt;P&gt;Every now and again there is an offer on &lt;A href=&quot;http://store.steampowered.com/&quot; target=&quot;&quot; name=&quot;&quot; className&gt;Steam&lt;/A&gt; that gets my attention.&lt;/P&gt;
&lt;P&gt;This time round its &lt;A href=&quot;http://store.steampowered.com/app/7200/&quot; target=&quot;&quot; name=&quot;&quot; className&gt;Trackmania United Forever&lt;/A&gt; at 50% OFF until 10 Aug 2009.  That means it drops from &#163;19.99 to &#163;9.99.&lt;/P&gt;
&lt;P&gt;This is a great price for a great game, but I am not sure it will give me the extra playability over that of the FREE version (&lt;A href=&quot;http://store.steampowered.com/app/11020/&quot; target=&quot;&quot; name=&quot;&quot; className&gt;Trackmania Nations Forever&lt;/A&gt;) to warrant spending the cash.&lt;/P&gt;
&lt;P&gt;Eitherway if your not sure about Untited, you should definitley get yourself a FREE copy of Nations through Steam.&lt;/P&gt;
&lt;P&gt;For more information on what Steam is click &lt;A href=&quot;http://store.steampowered.com/about/&quot; target=&quot;&quot; name=&quot;&quot; className&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=9</guid>
		<pubDate>Tue, 04 Aug 2009 21:23:38 +0100</pubDate>
	</item>
	<item>
		<title>eggBlog - Guest Comments</title>
		<link>http://www.contraflo.co.uk/articles/eggBlog-Guest-Comments-8.htm</link>
		<description>The Blog software I have chosen to use for the articles section is called &lt;A href=&quot;http://eggblog.net/&quot; name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot;&gt;eggBlog&lt;/A&gt; and its pretty good especially as its on an open source licence which means I can make any changes to it that I require.&lt;BR&gt;&lt;BR&gt;I have already made various theme changes to integrate it with this site, but until now I have not done much to change its operation.&lt;BR&gt;&lt;BR&gt;One of the limitations it has is that comments can only be posted by registered users.  I have managed to modify the code and integrate &lt;A href=&quot;http://recaptcha.net/&quot; name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot;&gt;reCaptcha&lt;/A&gt; (my chosen Captcha solution) with the comment posting code so now if you are not logged in you can still comment on posts as a Guest you just have to complete the Captcha.&lt;BR&gt;&lt;BR&gt;For any registered users, if you are logged in it will work as normal and you will NOT have to complete the Captcha.&lt;BR&gt;&lt;BR&gt;If anyone would like the source code just let me know, you never know I may even get around to posting it in the&lt;SPAN style=&quot;TEXT-DECORATION: underline&quot;&gt; &lt;/SPAN&gt;&lt;A href=&quot;/downloads.php&quot; name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot;&gt;Downloads&lt;/A&gt; section.&lt;BR&gt;&lt;BR&gt;For more information about Captcha&apos;s there is a great Wikipedia page all about them &lt;A href=&quot;http://en.wikipedia.org/wiki/CAPTCHA&quot; name=&quot;&quot; target=&quot;&quot; classname=&quot;&quot;&gt;here&lt;/A&gt;.&lt;BR&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=8</guid>
		<pubDate>Wed, 22 Jul 2009 13:23:08 +0100</pubDate>
	</item>
	<item>
		<title>Windows 7 E UK Pre-Order 50% OFF</title>
		<link>http://www.contraflo.co.uk/articles/Windows-7-E-UK-Pre-Order-50%25-OFF-7.htm</link>
		<description>&lt;p&gt;I know this will come a little late for some, but as the offer doesnt expire until August 9th 2009 I thought I&apos;d mention it as it is a pretty fantastic offer.&lt;/p&gt;
&lt;p&gt;In short Microsoft have decided to &apos;be nice&apos; and offer the Home Premium and Professional editions of Windows 7 at upgrade prices, if you pre order it between July 15th 2009 and Aug 9th 2009.&lt;/p&gt;
&lt;p&gt;Pre-Order Prices:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows 7 E Professional - &#163;89.97 
&lt;/li&gt;&lt;li&gt;Windows 7 E Home Premium - &#163;44.97&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The reason for this offer is that European customers can only have the &apos;E&apos; version which does not come bundled with a browser (no Internet Explorer) in an effort to comply with European Competition rules.  This basically means there is no upgrade option for EU customers.&lt;/p&gt;
&lt;p&gt;You can still download IE free of charge of course and the recommendation is to do it before you do a clean install fo Win7.  You could of course take this opportunity to try one of the many free browsers like Firefox.&lt;/p&gt;
&lt;p&gt;Dont miss out on this great offer of a cheap Full Retail version of Windows 7.&lt;/p&gt;
&lt;p&gt;More info here: &lt;a href=&quot;http://www.microsoft.com/uk/windows/buy/offers/pre-order.aspx&quot;&gt;http://www.microsoft.com/uk/windows/buy/offers/pre-order.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br&gt;The Offer is no longer available and Microsoft have now changed there stance on the Windows 7 &apos;E&apos; versions.  As per the link above Europe will now get the same version as other countries, including Internet Explorer.&lt;br&gt;This also allows for Upgrade versions to be sold.&lt;/p&gt;
&lt;p&gt;For those of us lucky enough to get in on it, our pre-orders still stand and we will now recieve full versions of the non &apos;E&apos; version just like everyone else.&lt;/p&gt;</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=7</guid>
		<pubDate>Tue, 21 Jul 2009 12:28:33 +0100</pubDate>
	</item>
	<item>
		<title>Excel - In the begining...</title>
		<link>http://www.contraflo.co.uk/articles/Excel-In-the-begining...-6.htm</link>
		<description>This is the first of many (well at least more than one) articles I&apos;ll be writing on Microsoft Excel.&lt;BR&gt;I use Excel as my example because it is the most well known and well used spreadsheet applications, however most of the articles should be relevant for other spreadsheet applications such as &lt;A href=&quot;http://www.openoffice.org/product/calc.html&quot;&gt;Open Office Calc&lt;/A&gt; too.&lt;BR&gt;&lt;BR&gt;&lt;B&gt;When to use Excel?&lt;/B&gt;&lt;BR&gt;Firstly I wanted to cover when and why you would use Excel. The simple answer is when you would use a calculator for lots of different calculations, such as your personal accounts or small sales invoices.&lt;BR&gt;In reality Excel is capable of alot more than basic additions, subtractions, multiplications and divisions. You can use it to make straight forward decisions based on criteria, for example if you run a club and wanted to give a prize to those with at least 80% attendance, you could use Excel to look at your register and indicate which members get a prise.&lt;BR&gt;Many Businesses use Excel for reporting and analysis. This is handy because Excel will recalculate formulas as you type allowing you to see what will happen if you change a parameter, a recent example of this is the change in UK VAT, quickly changing this figure in excel would allow it to recalculate the VAT for your products.&lt;BR&gt;&lt;BR&gt;&lt;B&gt;When to NOT use Excel?&lt;/B&gt;&lt;BR&gt;I have shown some ideas of when you might want to use Excel, but when would you be best not using Excel?&lt;BR&gt;For when you need to perform a basic calculation dont use Excel, you wouldnt want to open a new spreadsheet everytime you wanted to see what the changes is from an Ice Cream or at the end of a meal.&lt;BR&gt;Heavy statistical analysis is arguably not best suited for Excel. Its not that Excel should&apos;nt be used for this, just that there are other tools that are designed specifically for this.&lt;BR&gt;The same go&apos;s for accounting. Excel is very capable of producing accounting figures however there are accounting packages much better suited for the task overall, they only addition here being that Excel can be great for the bits that your accounting package may not cover.&lt;BR&gt;&lt;BR&gt;&lt;B&gt;Real World Example&lt;/B&gt;&lt;BR&gt;Thats enough of an Introduction to Excel, except to wet your appitite with a nice real world example.&lt;BR&gt;This example has formulae and information to calcualte deposits on houses and what your deposit will buy you.&lt;BR&gt;&lt;A href=&quot;/downloads/excel/house_deposit.zip&quot;&gt;House Deposit&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;More Examples and Contact&lt;/B&gt;&lt;BR&gt;All my Excel tools and examples can be found in the &lt;A href=&quot;/downloads.php&quot;&gt;Downloads&lt;/A&gt; area and are completely free, but please read the &lt;A href=&quot;/terms.php&quot;&gt;terms&lt;/A&gt; before use. &lt;BR&gt;If you have any feedback or questions feel free to signup and leave a comment on this post, or as usual use the &lt;A href=&quot;/contact.php&quot;&gt;Contact&lt;/A&gt; area.</description>
		<guid>http://www.contraflo.co.uk/articles/news.php?id=6</guid>
		<pubDate>Fri, 05 Jun 2009 12:52:12 +0100</pubDate>
	</item>
</channel>
</rss>
