<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3748597114545599697</atom:id><lastBuildDate>Fri, 01 Nov 2024 11:38:02 +0000</lastBuildDate><category>database</category><category>design</category><category>sql</category><category>dbms</category><category>news</category><category>random</category><category>amazon</category><category>oracle</category><category>security</category><category>cloud computing</category><category>mysql</category><category>plsql</category><category>simpledb</category><category>tsql</category><category>MapReduce</category><category>best practice</category><category>db</category><category>dba4life</category><category>documentation</category><category>mssql</category><category>naming convention</category><category>saas</category><category>sql injection</category><category>backup</category><category>bigtable</category><category>cluster</category><category>comic</category><category>conference</category><category>convert</category><category>crypto</category><category>daas</category><category>data</category><category>data warehouse</category><category>dba</category><category>discworld</category><category>erd</category><category>expression</category><category>firstpost</category><category>hypertable</category><category>ibm</category><category>introduction</category><category>logic</category><category>longjump</category><category>meme</category><category>microsoft</category><category>modelling</category><category>nerdvana</category><category>null</category><category>offtopic</category><category>patch</category><category>pdf</category><category>perl</category><category>programmers</category><category>quote</category><category>relational model</category><category>scalability</category><category>searchengine</category><category>south park evolution</category><category>sql injection security uc8010</category><category>ssrs</category><category>sun</category><category>t-sql tuesday</category><category>text analytics</category><category>tricks</category><category>txt</category><category>worst practices</category><title>dba4life</title><description>The life of a Database Administrator</description><link>http://dba4life.blogspot.com/</link><managingEditor>noreply@blogger.com (Benjamin)</managingEditor><generator>Blogger</generator><openSearch:totalResults>71</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-4100023857620967881</guid><pubDate>Wed, 10 Aug 2011 16:22:00 +0000</pubDate><atom:updated>2011-08-10T23:41:51.839-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">best practice</category><category domain="http://www.blogger.com/atom/ns#">t-sql tuesday</category><title>Put a Diaper On It</title><description>Inspired by Adam Machanic&#39;s&amp;nbsp;&lt;a href=&quot;http://sqlblog.com/blogs/adam_machanic/archive/tags/T-SQL+Tuesday/default.aspx&quot;&gt;T-SQL Tuesday&lt;/a&gt; topic of &#39;Crap Code&#39; I decided to take a bit of a different bent--preventing crap code. &amp;nbsp;Instead of coming off as incredibly arrogant by admitting that I cannot recall code that I have written that I am&amp;nbsp;embarrassed&amp;nbsp;of, I thought to answer why that is. &lt;br /&gt;
&lt;br /&gt;
There is definitely code that I revisit that I would like to rewrite bits of. &amp;nbsp;Generally, this is because I am better today than when I wrote the code; learned a new trick, new version has a better function, got a bit more sleep. So what is it that prevents, or at least corrals, crap code? &amp;nbsp;Defined purpose and consistent code. &amp;nbsp;If your code explains &lt;i&gt;why&lt;/i&gt; it is doing what it does and is &lt;a href=&quot;http://dba4life.blogspot.com/2007/12/formatting.html&quot;&gt;consistently formatted&lt;/a&gt;, it is hard to argue with your original reasoning.&lt;br /&gt;
&lt;br /&gt;
So go easy on yourself, jamiet--&lt;a href=&quot;http://sqlblog.com/blogs/jamie_thomson/archive/2011/08/10/t-sql-tuesday-some-code-is-born-crap-some-code-achieves-crapness-and-some-code-has-crapness-thrust-upon-it.aspx&quot;&gt;that&lt;/a&gt; is not crap code, that is good code dealing with crap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</description><link>http://dba4life.blogspot.com/2011/08/inspired-by-adam-machanics-t-sql.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-3360115245014964069</guid><pubDate>Wed, 27 Apr 2011 23:47:00 +0000</pubDate><atom:updated>2011-04-27T16:48:05.133-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">quote</category><title>Quote</title><description>&quot;Good design is anticipating the stupidity of users.&quot;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Discuss.&lt;/div&gt;</description><link>http://dba4life.blogspot.com/2011/04/quote.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-7113285291968784079</guid><pubDate>Mon, 07 Mar 2011 22:26:00 +0000</pubDate><atom:updated>2011-04-27T16:47:04.036-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">documentation</category><title>Documentation</title><description>If your work isn&#39;t documented, it is worthless.  This is my new modus operandi.  A couple years of silence is largely due to working projects with failed documentation.  It is incredibly draining.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I spent my 20&#39;s shirking documentation; excuses like, &#39;the code is self-documenting (I am decent at effective minimal commenting),&#39; &#39;this is a one time deal.&#39;  There were always reasons not to document.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am paying for that now.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So do yourself a favor and document.  It is a little something to make certain that two parties have reached an understanding.  It is a little something to help those that follow you.  Sure, it is mundane, but documentation is for heroes.&lt;/div&gt;</description><link>http://dba4life.blogspot.com/2011/03/documentation.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-7988216757750036975</guid><pubDate>Thu, 28 May 2009 02:39:00 +0000</pubDate><atom:updated>2009-05-27T19:50:49.686-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">expression</category><category domain="http://www.blogger.com/atom/ns#">ssrs</category><title>SSRS: Current Month Date Parameter Defaults</title><description>&lt;div id=&quot;:cn&quot; class=&quot;ii gt&quot;&gt;&lt;div&gt;Now and again, I have to pretend that I am a report monkey.  SQL Server Reporting Services makes that easy, since most of things are relatively intuitive.  Today, I got to figure out (and by &#39;figure out,&#39; I mean &#39;Google&#39;) the easiest way to create report parameters that default to the first and last days of the current month.  The following is what I came up...  Surprised that there is not a function to readily do this.  So, without further ado, for my future reference, I present the following expressions.&lt;br /&gt;&lt;br /&gt;The first of the current month:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;=FormatDateTime(&lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;dateserial(year(Today), month(&lt;wbr&gt;Today), 1),&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;DateFormat.ShortDate                                             -- Format as mm/dd/yyyy&lt;br /&gt;&lt;/div&gt; &lt;div style=&quot;font-family: courier new;&quot;&gt;)&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The last day of the current month:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;=FormatDateTime(&lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DateAdd(&lt;br /&gt;&lt;/div&gt; &lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&quot;d&quot;, &lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;-1, &lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;DateAdd(&lt;br /&gt;&lt;/div&gt; &lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&quot;m&quot;, &lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;1, &lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;dateserial(year(Today), month(&lt;wbr&gt;Today), 1)&lt;/div&gt; &lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;    ), &lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;DateFormat.ShortDate&lt;/div&gt; &lt;div style=&quot;font-family: courier new;&quot;&gt;)&lt;/div&gt;&lt;div style=&quot;font-family: courier new;&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And free of formatting and comments, for your copy-and-paste convenience:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;=FormatDateTime(dateserial(&lt;wbr&gt;year(Today),month(Today),1), DateFormat.ShortDate)&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=FormatDateTime(DateAdd(&quot;d&quot;, -1, DateAdd(&quot;m&quot;, 1, dateserial(year(Today),month(&lt;wbr&gt;Today),1))), DateFormat.ShortDate)&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt; &lt;/div&gt;</description><link>http://dba4life.blogspot.com/2009/05/ssrs-current-month-date-parameter.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-4778833455750809173</guid><pubDate>Sat, 16 May 2009 23:44:00 +0000</pubDate><atom:updated>2009-05-16T16:51:05.144-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">random</category><category domain="http://www.blogger.com/atom/ns#">searchengine</category><title>Wolfram Fail</title><description>I have been looking forward to &lt;a href=&quot;http://www.wolframalpha.com&quot;&gt;Wolfram Alpha&lt;/a&gt; going live.  I am no longer so impressed.  After trying to find how many state employees California has, to no avail, I asked a simpler question.  It looks like, contrary to the hype, Google is safe for a while...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsTo8xWtnPDsncNcIGquk54hjPaxlL2yYFFqOVUNeqeJq2xLVfAp_w_HzO8M1UeyYKhfPuDTSXgUi6mcWprz56eEq3sGp-7xJuoMlREHvAUJwI_rVMSu9HI9dPFFN1keB2P08bQenN2fvY/s1600-h/WolframAlpha.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 294px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsTo8xWtnPDsncNcIGquk54hjPaxlL2yYFFqOVUNeqeJq2xLVfAp_w_HzO8M1UeyYKhfPuDTSXgUi6mcWprz56eEq3sGp-7xJuoMlREHvAUJwI_rVMSu9HI9dPFFN1keB2P08bQenN2fvY/s400/WolframAlpha.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5336572889654500722&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2009/05/wolfram-fail.html</link><author>noreply@blogger.com (Benjamin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsTo8xWtnPDsncNcIGquk54hjPaxlL2yYFFqOVUNeqeJq2xLVfAp_w_HzO8M1UeyYKhfPuDTSXgUi6mcWprz56eEq3sGp-7xJuoMlREHvAUJwI_rVMSu9HI9dPFFN1keB2P08bQenN2fvY/s72-c/WolframAlpha.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-5976246172101718915</guid><pubDate>Sat, 07 Feb 2009 02:19:00 +0000</pubDate><atom:updated>2009-02-06T18:27:31.337-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">convert</category><category domain="http://www.blogger.com/atom/ns#">pdf</category><category domain="http://www.blogger.com/atom/ns#">perl</category><category domain="http://www.blogger.com/atom/ns#">txt</category><title>Perl: Convert PDF Files to Text</title><description>Using the CAM::PDF package, it is easy to extract the text from PDF files.  The following script takes all PDF files from a directory and extracts the text of the entire file and writes it to a text file.&lt;br /&gt;&lt;br /&gt;This script is also available at &lt;a href=&quot;http://dba4life.com/scripts/pdf2txt.pl.txt&quot;&gt;dba4Life&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;use IO::Handle;&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;&lt;br /&gt;use CAM::PDF;&lt;br /&gt;use CAM::PDF::PageText;&lt;br /&gt;&lt;br /&gt;my $PDFDIR = &quot;./SomeSubDirectory&quot;;&lt;br /&gt;my $pdf;&lt;br /&gt;my %ddl;&lt;br /&gt;&lt;br /&gt;opendir DDL, $PDFDIR || die &quot;Error in opening PDF directory $PDFDIR\n&quot;;&lt;br /&gt;&lt;br /&gt;while((my $filename = readdir(DDL)))&lt;br /&gt;{&lt;br /&gt;# Skip non-PDF files&lt;br /&gt;next if ($filename !~ /\.pdf$/);&lt;br /&gt;&lt;br /&gt;$filename = $PDFDIR . &#39;/&#39; . $filename;&lt;br /&gt;&lt;br /&gt;if(!-f $filename) { print &quot;\nCould not load $filename&quot;;}&lt;br /&gt;&lt;br /&gt;# Name output file same as the PDF&lt;br /&gt;my $output = $filename;&lt;br /&gt;$output =~ s/\.pdf/\.txt/;&lt;br /&gt;&lt;br /&gt;print &quot;Creating $output...\n&quot;;&lt;br /&gt;open(TXTFILE, &#39;&gt;&#39; . $output);&lt;br /&gt;&lt;br /&gt;# Load the PDF&lt;br /&gt;$pdf = CAM::PDF-&gt;new($filename);&lt;br /&gt;&lt;br /&gt;# Total number of pages within the PDF&lt;br /&gt;my $pages = $pdf-&gt;numPages;&lt;br /&gt;&lt;br /&gt;# Get the text for each page&lt;br /&gt;for(my $x = 1; $x &lt;= $pages; $x++)    {    print TXTFILE text_from_page($x);     }     close(TXTFILE); }  closedir DDL;     sub text_from_page  {   my $pg_num = shift;   return CAM::PDF::PageText-&gt;render($pdf-&gt;getPageContentTree($pg_num));&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</description><link>http://dba4life.blogspot.com/2009/02/perl-convert-pdf-files-to-text.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-8955780420510488125</guid><pubDate>Thu, 16 Oct 2008 23:42:00 +0000</pubDate><atom:updated>2008-10-16T16:53:27.596-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sql</category><category domain="http://www.blogger.com/atom/ns#">tricks</category><title>Simple SQL: Optional Parameters, Static Statements</title><description>Dynamic SQL, as wonderful a thing as it is, is horrible for security and maintenance.  Your best bet is to avoid it.  People often whine about making parameters optional.  If you set the parameters that you are not using to null, this is a simple thing to do:&lt;br /&gt;&lt;br /&gt;declare&lt;br /&gt;   @state char(02),&lt;br /&gt;   @zip char(05)&lt;br /&gt;&lt;br /&gt;set @state = &#39;CA&#39;&lt;br /&gt;set @zip = null&lt;br /&gt;&lt;br /&gt;select&lt;br /&gt;   Address&lt;br /&gt;from&lt;br /&gt;   CustomerAddress&lt;br /&gt;where&lt;br /&gt;   State = coalesce(@state, State)&lt;br /&gt;   and Zip = coalesce(@zip, Zip)&lt;br /&gt;&lt;br /&gt;Simple and elegant.&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/sql&quot; rel=&quot;tag&quot;&gt;sql&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/10/simple-sql-optional-parameters-static.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-6646237237943336188</guid><pubDate>Thu, 02 Oct 2008 00:23:00 +0000</pubDate><atom:updated>2008-10-01T17:39:42.826-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">amazon</category><category domain="http://www.blogger.com/atom/ns#">cloud computing</category><category domain="http://www.blogger.com/atom/ns#">microsoft</category><category domain="http://www.blogger.com/atom/ns#">mssql</category><title>EC2-SQL: Competition in the Cloud</title><description>Not to be outdone by &lt;a href=&quot;http://dba4life.blogspot.com/2008/09/sulphur-clouds-oracle-on-amazons-ec2.html&quot;&gt;Oracle&lt;/a&gt;, Microsoft SQL Server will be available on Amazon&#39;s EC2 come late autumn.  Read about it &lt;a href=&quot;http://aws.amazon.com/windows/&quot;&gt;here&lt;/a&gt;...  And you may want to read up on Microsoft&#39;s Windows Cloud operating system for developers at &lt;a href=&quot;http://tech.slashdot.org/article.pl?sid=08/10/01/1816208&amp;from=rss&quot;&gt;Slashdot&lt;/a&gt;.  Is Microsoft adapting?  Come on, now...  It happens...  Sometimes...  Seldom.&lt;br /&gt;&lt;br /&gt;And so goes another step for cloud computing...&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/amazon&quot; rel=&quot;tag&quot;&gt;amazon&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/mssql&quot; rel=&quot;tag&quot;&gt;mssql&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/microsoft&quot; rel=&quot;tag&quot;&gt;MicroSoft&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/10/ec2-sql-competition-in-cloud.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-408349209819676058</guid><pubDate>Thu, 25 Sep 2008 15:46:00 +0000</pubDate><atom:updated>2008-09-25T08:58:23.950-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">amazon</category><category domain="http://www.blogger.com/atom/ns#">oracle</category><title>Sulphur Clouds! Oracle on Amazon&#39;s EC2</title><description>&lt;a href=&quot;http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=9115291&amp;amp;source=rss_topic9&quot;&gt;Oracle puts its 11g database in Amazon&#39;s cloud&lt;/a&gt;.  With a title like that, what can I add?  This is a well written article about Oracle on EC2.  They are also supporting backups being shipped to Amazon.  Anything else and I will be reiterating the article.&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/amazon&quot; rel=&quot;tag&quot;&gt;amazon&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/oracle&quot; rel=&quot;tag&quot;&gt;oracle&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/09/sulphur-clouds-oracle-on-amazons-ec2.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-8151684205558089658</guid><pubDate>Fri, 19 Sep 2008 19:00:00 +0000</pubDate><atom:updated>2008-09-19T12:09:50.090-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">security</category><category domain="http://www.blogger.com/atom/ns#">sql injection</category><title>Oklahoma Finds Next Level of Stupidity</title><description>Wow.  That is all that I have to say after reading this article:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://thedailywtf.com/Articles/Oklahoma-Leaks-Tens-of-Thousands-of-Social-Security-Numbers,-Other-Sensitive-Data.aspx&quot;&gt;Oklahoma Leaks Tens of Thousands of Social Security Numbers, Other Sensitive Data&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Technically, State information is public...  But this goes beyond overshare.  You just &lt;span style=&quot;font-weight: bold;&quot;&gt;know&lt;/span&gt; that the application account has escalated privileges...  I have to go back to my opening statement; wow.  What a kick in the head...&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/security&quot; rel=&quot;tag&quot;&gt;security&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/sql%20injection&quot; rel=&quot;tag&quot;&gt;sql injection&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/09/oklahoma-finds-next-level-of-stupidity.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-3549094593240442940</guid><pubDate>Wed, 17 Sep 2008 17:36:00 +0000</pubDate><atom:updated>2008-09-17T10:57:53.831-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">documentation</category><title>Bad Design: A Reminder to Document</title><description>Brian Walker writes about &lt;a href=&quot;http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1330404,00.html?track=sy41&quot;&gt;SQL Server database design disasters: What not to do&lt;/a&gt;.  Unfortunately, these design failings are all too common.  We all take different things from articles; my tangent is about a lack of documentation. &lt;br /&gt;&lt;br /&gt;As a nerd, I would much rather do the fun part--creating, troubleshooting or anything else that requires thought.  As a consultant, time and time again I have seen poor designs that are compounded by a lack of documentation.  Not determining standards and and conventions, you facilitate others mutating a design with their own habits.  Even if you have a poor system, the maintenance of it can be helped by documentation.  Poor and consistent is a far cry better than poor and inconsistent.  That makes it generally referred to as &#39;awful.&#39;&lt;br /&gt;&lt;br /&gt;It really does not take much time to document your approach.  Simple documentation to outline the what and the why--even just a paragraph or two--might save countless hours down the line.  Bad design is often perpetuated by lack of formalizing the business process.  The least that a good database designer (or architect, if you prefer (I do--who doesn&#39;t want to be an &lt;span style=&quot;font-style: italic;&quot;&gt;architect&lt;/span&gt;?)) can do is document their approach; a naming convention document and a data dictionary.  It is also important to do this before, during and after the design/implementation.  Saying you will do it later typically means a rushed deadline is justification for not documenting (yeah, I have used that excuse too).  Perhaps writing it out will key you into a couple weaknesses of your design...  And wouldn&#39;t that make that horrible documentation process worthwhile?&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/design&quot; rel=&quot;tag&quot;&gt;design&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/documentation&quot; rel=&quot;tag&quot;&gt;documentation&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/09/bad-design-reminder-to-document.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-9192561606186664528</guid><pubDate>Wed, 10 Sep 2008 17:08:00 +0000</pubDate><atom:updated>2008-09-10T10:15:50.442-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">offtopic</category><title>Random: Data Presentation of Discretionary Spending</title><description>The New York Times has an interesting &lt;a href=&quot;http://www.nytimes.com/interactive/2008/09/04/business/20080907-metrics-graphic.html&quot;&gt;article&lt;/a&gt; about discretionary incoming spending, broken into a few categories.  Numbers are always interesting, but what really got me was the presentation of the data--very cool way of showing the world.</description><link>http://dba4life.blogspot.com/2008/09/random-data-presentation-of.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-1064747647090507873</guid><pubDate>Tue, 02 Sep 2008 17:59:00 +0000</pubDate><atom:updated>2008-09-02T11:19:14.083-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">naming convention</category><title>More on Naming Standards</title><description>Ronald Bradford has a very nice &lt;a href=&quot;http://ronaldbradford.com/blog/naming-standards-singular-or-plural-2008-09-02/&quot;&gt;article&lt;/a&gt; about naming conventions--and not just because we generally line up on our opinions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/design&quot; rel=&quot;tag&quot;&gt;design&lt;/a&gt;,&lt;br /&gt;&lt;a href=&quot;http://technorati.com/tag/naming%20convention&quot; rel=&quot;tag&quot;&gt;naming convention&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/09/more-on-naming-standards.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-5266402709197398937</guid><pubDate>Thu, 21 Aug 2008 21:21:00 +0000</pubDate><atom:updated>2008-08-21T14:44:39.446-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">naming convention</category><title>Singular Table Name</title><description>Almost as bad as prefixing tables with a table-indicator is using plural names.  Even Oracle tools default to this...  It is just wrong.&lt;br /&gt;&lt;br /&gt;A relation constitutes a header and a body.  The header (or relational schema) is a set of attribute (column) and domain (value) pairs.  The body is the set of tuples (rows).  A tuple is a valued occurrence of the header.&lt;br /&gt;&lt;br /&gt;Consequently, if you make your table names plural, make your column names plural for consistency.&lt;br /&gt;&lt;br /&gt;Less mathematical justifications for using singular tables names include:&lt;br /&gt;&lt;br /&gt;Consistency - Because sometimes you need &#39;es&#39; to pluralize a word.&lt;br /&gt;Consistency - Shouldn&#39;t &#39;ProductOrders&#39; be &#39;ProductsOrders?&#39;&lt;br /&gt;&lt;br /&gt;Just like your mother taught you, just because everyone else is doing it, doesn&#39;t make it right.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/design&quot; rel=&quot;tag&quot;&gt;design&lt;/a&gt;, &lt;br /&gt;&lt;a href=&quot;http://technorati.com/tag/naming%20convention&quot; rel=&quot;tag&quot;&gt;naming convention&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/08/singular-table-name.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-2137436125502990633</guid><pubDate>Fri, 15 Aug 2008 15:39:00 +0000</pubDate><atom:updated>2008-08-15T08:45:32.147-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">comic</category><category domain="http://www.blogger.com/atom/ns#">oracle</category><title>Newish DBA Comic Strip, World Rejoices</title><description>For a few weeks I have been following &lt;a href=&quot;http://www.orcldba.com/ace/&quot;&gt;The Adventures of Ace, DBA&lt;/a&gt;.  There have been a few funnies.  And today&#39;s is rather good (the previous Error Code strip was good too).  It is a new database-centric stick figure comic strip.  There is no more to read here; go, be amused.</description><link>http://dba4life.blogspot.com/2008/08/newish-dba-comic-strip-world-rejoices.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-5092919462663296176</guid><pubDate>Thu, 07 Aug 2008 16:48:00 +0000</pubDate><atom:updated>2008-08-07T10:00:24.469-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">mssql</category><title>SQL Server 2008 Released</title><description>SQL Server 2008 is now &lt;a href=&quot;http://blogs.technet.com/technetplussubscriptions/archive/2008/08/06/sql-server-2008-rtm-now-available-on-technet.aspx&quot;&gt;available&lt;/a&gt;.  Read about &lt;a href=&quot;http://blogs.techrepublic.com.com/datacenter/?p=218&quot;&gt;what&#39;s new&lt;/a&gt; and the &lt;a href=&quot;http://blogs.msdn.com/buckwoody/archive/2008/07/15/sql-server-2008-improvements-practicals-t-sql-debugger.aspx&quot;&gt;return of the debugger&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/mssql&quot; rel=&quot;tag&quot;&gt;mssql&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/08/sql-server-2008-released.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-4997254987563000953</guid><pubDate>Wed, 06 Aug 2008 22:05:00 +0000</pubDate><atom:updated>2008-08-06T15:13:46.386-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">nerdvana</category><title>Fiction For A Better Reality... Please</title><description>Cory Doctorow  &lt;a href=&quot;http://www.boingboing.net/2008/08/06/the-things-that-make.html&quot;&gt;plugged&lt;/a&gt; his new story, &lt;a href=&quot;http://www.tor.com/index.php?option=com_content&amp;amp;view=story&amp;amp;id=2993&quot;&gt;The Things that Make Me Weak and Strange Get Engineered Away&lt;/a&gt; &#39;about geek monasteries that house smart people who can&#39;t get along in the world and put them to work as coders.&#39;  It is hosted by Tor--great SF publisher that gives out free books!  Well, they used to...  Have not received one for a while.  In any event, check out Tor.&lt;br /&gt;&lt;br /&gt;Make it real!  Great premise...  Any interested investors out there?  &lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/fiction&quot; rel=&quot;tag&quot;&gt;fiction&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/creative%20commons&quot; rel=&quot;tag&quot;&gt;Creative Commons&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/08/fiction-for-better-reality-please.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-7314332373561337225</guid><pubDate>Thu, 24 Jul 2008 21:14:00 +0000</pubDate><atom:updated>2008-07-24T14:59:56.692-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">data warehouse</category><category domain="http://www.blogger.com/atom/ns#">dbms</category><title>Microsoft Leads Data Warehousing to Happiness</title><description>This headline covers it all:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://blogs.forrester.com/information_management/2008/07/microsoft-acqui.html&quot;&gt;Microsoft Acquiring DATAllegro, Rebooting Data Warehousing Appliance Strategy, Triggering Industry Consolidation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Or you can read &lt;a href=&quot;http://www.datallegro.com/pr/7_24_08_microsoft_acquisition.asp&quot;&gt;the official press release&lt;/a&gt;.  Hopefully they do better with data than &lt;a href=&quot;http://www.dbms2.com/2008/07/03/datallegro-cartoon/&quot;&gt;comedy&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/data%20warehouse&quot; rel=&quot;tag&quot;&gt;data warehouse&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/dbms&quot; rel=&quot;tag&quot;&gt;dbms&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/microsoft&quot; rel=&quot;tag&quot;&gt;Microsoft&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/07/microsoft-leads-data-warehousing-to.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-7588650447091096923</guid><pubDate>Thu, 24 Jul 2008 16:48:00 +0000</pubDate><atom:updated>2008-07-24T11:19:47.292-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">best practice</category><category domain="http://www.blogger.com/atom/ns#">db</category><category domain="http://www.blogger.com/atom/ns#">dba</category><title>Database Best Practices</title><description>&lt;h2&gt;Preamble&lt;/h2&gt;Like all things, we tend to speak in black and white while we act in grays.  This implies that we should be wary the individual that speaks in grays because they probably act in black and whites.  Documentation should always be black and white; we want to provide a body of work that elicits understanding.&lt;br /&gt;&lt;br /&gt;Best practices define the tried and true methodologies.  The vast majority of the time, we can and should abide by the conventional wisdom.  All too frequently, people justify a poor approach by citing complexities.  It has been my experience that if you cannot make something sound simple, it is not well understood.  Complexity is just a sequence of simple steps.  Just like designing a database, break down the concepts and strive for the beauty of simplicity.  If you arrive at something that cannot be fitted into the mold, accept that you may have to step outside of best practice; just make certain you document why.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Key Best Practice Points&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Backup and Maintenance Plans – The first tenet of being a DBA; always have a backup plan.  The backup plan should accommodate the business needs by guaranteeing minimal downtime and optimal data recovery.&lt;/li&gt;&lt;li&gt;Minimum Permissions –All database users should operate with only the permissions required to complete assigned tasks.&lt;/li&gt;&lt;li&gt;Change control – Change control ensures minimal downtime and efficient and effective updates.  All proposed changes to production should be documented and provided in a manner that can be tested and rollback if necessary.&lt;/li&gt;&lt;li&gt;Separate Environments –Changes should be migrated across physically distinct environments; development, test and production.  Developers should not have access to production environments.  Test should be treated as production; changes should be &lt;span style=&quot;font-style: italic;&quot;&gt;tested &lt;/span&gt;against a production backup.&lt;/li&gt;&lt;li&gt;Documentation – Complete documentation serves to illustrate that thought went into the design, that maintenance is not an afterthought and provides a forum to justify design decisions and points of contention.&lt;/li&gt;&lt;li&gt;Comments – While code is largely self-documenting for those that know the language, clarifying the methodology with logic/process comments is tremendously useful.&lt;/li&gt;&lt;li&gt;Naming convention – Determine and adhering to a naming convention promotes consistent coding and documentation.&lt;/li&gt;&lt;li&gt;Always define primary keys – Candidate keys should be documented and a primary key should be physically enforced. If using surrogate keys, logical keys should still be physically enforced.&lt;/li&gt;&lt;li&gt;Constraints – Referential integrity constraints prevents orphaned data. Check constraints are the physical enforcement of business rules.&lt;/li&gt;&lt;li&gt;Normalization – Third normal form is the default level to design to.Avoid NULL – Understand what null values are. Minimize null values by properly normalizing.&lt;/li&gt;&lt;li&gt;Stored Procedures – Promotes maintainability via a separate and complete body of database code. Security is easier to implement by function. Improves performance.&lt;/li&gt;&lt;li&gt;Avoid wildcard selects – Explicit column lists reduce unnecessary I/O and processing.  Additionally, they promote better change control.&lt;/li&gt;&lt;li&gt;Avoid Distinct – Adds I/O and processing.  If data is not being uniquely selected, re-evaluate the query.  Distinct is often a shortcut for lazy querying, poor design or both.&lt;/li&gt;&lt;li&gt;Derived statements – Derived statements can often drastically improve performance.&lt;/li&gt;&lt;li&gt;Explicit joins –Qualify intent by using explicit joins.&lt;/li&gt;&lt;li&gt;Minimize Cursor Utilization – Cursors are expensive operavtions; by thinking in sets, cursors are often rendered unnecessary.&lt;/li&gt;&lt;li&gt;Minimize triggers—Triggers are often misused to accommodate poor process and/or poor design.  Triggers should not perform any complex actions, nor perform non-deterministic actions that may affect other data.&lt;/li&gt;&lt;li&gt;Avoid dynamic SQL – Dynamic SQL complicates maintenance, requires escalated privileges (explicit table grants) and typically negates performance benefits of stored execution plans.&lt;/li&gt;&lt;li&gt;Error/exception handling – After modifying operations, check the success.  As well, general exceptions that are likely to arise should be handled.&lt;/li&gt;&lt;li&gt;Avoid wildcards at the start of strings – Wildcards reduce index efficiency; when used at the beginning of strings, indexes are largely disregarded.&lt;/li&gt;&lt;li&gt;Do not store derived columns – If you can calculate the values from existing fields, it should not be stored; use views to present derived values.&lt;/li&gt;&lt;li&gt;Minimize text/blobs – Fundamentally, compound objects do not belong within the relational model.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/best%20practice&quot; rel=&quot;tag&quot;&gt;best practice&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/dba&quot; rel=&quot;tag&quot;&gt;dba&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/07/database-best-practices.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-5986469435631557788</guid><pubDate>Wed, 23 Jul 2008 18:03:00 +0000</pubDate><atom:updated>2008-07-23T11:14:22.017-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">random</category><category domain="http://www.blogger.com/atom/ns#">text analytics</category><title>Flipping Awesome</title><description>&lt;a href=&quot;http://pressflip.com/&quot;&gt;PressFlip&lt;/a&gt; is a learning recommendation service...  It is smart.  And cool--so cool it destroyed my thesaurus.  Text analytics is heading for huge, so check out a very slick implementation.   &lt;a href=&quot;http://teddziuba.com/2008/07/persai-is-now-pressflip-and-it.html&quot;&gt;Read&lt;/a&gt; Ted&#39;s unofficial press release.  That guy can write...  I missed his style.&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/text%20analytics&quot; rel=&quot;tag&quot;&gt;text analytics&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/07/flipping-awesome.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-3895840403466029730</guid><pubDate>Fri, 18 Jul 2008 21:18:00 +0000</pubDate><atom:updated>2008-07-21T11:42:01.363-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">mysql</category><title>MySQL: No Interactive Cursors?  Curses!</title><description>&lt;a href=&quot;http://www.mysql.com/&quot;&gt;MySQL&lt;/a&gt;, the billion dollar open source database management system that runs some pretty serious websites.  A database engine that does not allow you to run interactive blocks nor cursors.  That you cannot even interactively reference a variable?!  No wonder more people do not use stored procedures with MySQL...&lt;br /&gt;&lt;br /&gt;Will people please tell me that I am wrong, that I have missed something?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/mysql&quot; rel=&quot;tag&quot;&gt;mysql&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/07/mysql-no-interactive-cursors-curses.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-192791518129762658</guid><pubDate>Tue, 15 Jul 2008 00:32:00 +0000</pubDate><atom:updated>2008-07-18T10:06:03.281-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">null</category><category domain="http://www.blogger.com/atom/ns#">sql</category><title>Null Understanding</title><description>&lt;h2&gt;Defining Null&lt;/h2&gt;Contrary to the first sentence of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Null_%28SQL%29&quot;&gt;Null SQL&lt;/a&gt; entry on Wikipedia, null does not mean &#39;no value&#39; (the page on &lt;a href=&quot;http://en.wikipedia.org/wiki/Ternary_logic&quot;&gt;Three Valued Logic&lt;/a&gt; (3VL) gets it right).  If it it did, &#39;select * from Address where Zip = NULL&#39; would return the same results as &#39;select * from Address where Zip is null&#39;.  Strictly speaking, when a value is null it means that &lt;span style=&quot;font-weight: bold;&quot;&gt;there may be a value or there may not be a value; we do not know the value.&lt;/span&gt;  Null is the unknown-value-placeholder.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;To Null, or Not to Null&lt;/h2&gt;Jihad!  Nulls create a nice bifurcation in the database world.  Basically, if you think nulls are bad, you get lumped in with the theorists.  If you think nulls are good, well, a programmer or a practitioner (it gets a little muddy--null?).  The truth is, null values and logic do have their place.  It may not be a comfortable place (and not somewhere I want to go), but they have come to be a necessity.&lt;br /&gt;&lt;br /&gt;Nulls are handled differently than known values.  Consequently, the presence of null values often creates complexity.  If the value is missing, we sometimes want to include it in our set, and sometimes not... Isn&#39;t that a key point to 3VL?&lt;br /&gt;&lt;br /&gt;The important point is to use nulls as they were intended; to reflect a value in an unknown state.  Do not use the null for non-values or missing values--that serves to perpetuate the misunderstanding.&lt;br /&gt;&lt;br /&gt;Personally, I am on C.J. Date&#39;s side--don&#39;t use them.  Even so, there are times when a design is conducive to null logic.&lt;br /&gt;&lt;br /&gt;Codd later proposed a Four Value Logic for the Relational Model.  By that time (and in part because), nulls were being misused by the practitioners.  I wonder if the 4VL had survived if we would still misuse nulls or if the whole debate would be null and void...&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/null&quot; rel=&quot;tag&quot;&gt;null&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/sql&quot; rel=&quot;tag&quot;&gt;sql&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/07/null-understanding.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-9055210227434617798</guid><pubDate>Thu, 10 Jul 2008 16:54:00 +0000</pubDate><atom:updated>2008-07-10T10:03:03.683-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">logic</category><category domain="http://www.blogger.com/atom/ns#">random</category><title>Deifying Logic</title><description>I stumbled upon &lt;a href=&quot;http://www.logictutorial.com/logic16things.html&quot;&gt;a very cool diagram&lt;/a&gt;.  It illustrates,  literally (err... figuratively? (seriously, why is &#39;literally&#39; so often misused?)) &quot;16 permutations formed by affirming or denying two propositions, A and B.&quot;  A strong understand of basic logic helps us with all facets of life, not just optimizing our query skills.</description><link>http://dba4life.blogspot.com/2008/07/deifying-logic.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-2573156191490692505</guid><pubDate>Thu, 03 Jul 2008 17:55:00 +0000</pubDate><atom:updated>2008-07-07T12:34:35.963-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">cloud computing</category><category domain="http://www.blogger.com/atom/ns#">relational model</category><title>Relational vs. Cloud</title><description>The Scale Out Blog has an interesting &lt;a href=&quot;http://scale-out-blog.blogspot.com/2008/06/cloudcamp-san-francisco-sql-or-simpledb.html&quot;&gt;article&lt;/a&gt; about the relational model and cloud databases.</description><link>http://dba4life.blogspot.com/2008/07/relational-vs-cloud.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3748597114545599697.post-7063960608477397453</guid><pubDate>Wed, 25 Jun 2008 16:32:00 +0000</pubDate><atom:updated>2008-07-18T10:08:06.394-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">security</category><category domain="http://www.blogger.com/atom/ns#">sql injection</category><title>SQL Injection: Not an Issue</title><description>Denis Gobo has a post about &lt;a href=&quot;http://sqlblog.com/blogs/denis_gobo/archive/2008/06/25/7491.aspx&quot;&gt;Microsoft addressing SQL injection&lt;/a&gt;.  Microsoft is being more proactive in preventing SQL injection by providing tools to scan sites and code.  Here is a thought; stop publishing example code with inline SQL.  Best practices are &#39;best&#39; for a reason.  Denis closes by stating that the &#39;problem is of course that you should never ever run as dbo or even worse sa.&#39;   And it really is almost that simple.  An application account should have the minimum permissions needed for execution.   If you use stored procedures, you do not even need to grant select permissions on tables (you aren’t using dynamic SQL, are you?).   What is better than that?&lt;br /&gt;&lt;br /&gt;Best practices tell you to check your inputs but really you can be rather lazy about this if you are parameterizing (it’s a word now) your stored procedure calls and are not using dynamic SQL; pretty hard to inject a string into a number field.  That means that all you need to do is validate strings.   Even if you do not do that, the account can only connect and run procedures.  Failing this (because you really absolutely cannot see how you cannot use dynamic SQL (think harder)), use parameterized queries.  Make certain that the application limits inputs—why is a name field large enough to contain an entire SQL block?&lt;br /&gt;&lt;br /&gt;So what have we learned?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Minimum permissions&lt;/li&gt;&lt;li&gt;Use stored procedures&lt;/li&gt;&lt;li&gt;Check your inputs&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I do not mean to oversimplify, but I cannot make it sound complicated.   If you code right, your work is done.   SQL injection is an issue for half-assed developers.  The end.&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href=&quot;http://technorati.com/tag/sql%20injection&quot; rel=&quot;tag&quot;&gt;sql injection&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/security&quot; rel=&quot;tag&quot;&gt;security&lt;/a&gt;</description><link>http://dba4life.blogspot.com/2008/06/sql-injection-not-issue.html</link><author>noreply@blogger.com (Benjamin)</author><thr:total>0</thr:total></item></channel></rss>