<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>TechToolBlog &#187; database</title>
	<link>http://www.techtoolblog.com</link>
	<description></description>
	<pubDate>Mon, 30 Aug 2010 13:08:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>SQL Formatter</title>
		<link>http://www.techtoolblog.com/archives/sql-formatter</link>
		<comments>http://www.techtoolblog.com/archives/sql-formatter#comments</comments>
		<pubDate>Mon, 09 Jul 2007 19:51:28 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[database]]></category>

		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.techtoolblog.com/archives/sql-formatter</guid>
		<description><![CDATA[Our DBA writes some mean SQL code, I can write some SQL that works :).&#160; It&#8217;s not my strongest suit but certainly not my weakest so I handle most of my sql statements myself.&#160; However, when I need his help I cringe at sending him my sql code because he freaks when he sees it.&#160; [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "SQL Formatter", url: "http://www.techtoolblog.com/archives/sql-formatter" });</script>]]></description>
			<content:encoded><![CDATA[<p>Our DBA writes some mean SQL code, I can write some SQL that works :).&nbsp; It&#8217;s not my strongest suit but certainly not my weakest so I handle most of my sql statements myself.&nbsp; However, when I need his help I cringe at sending him my sql code because he freaks when he sees it.&nbsp; To me SQL is a string variable, I use to not care how pretty the formatting is, what tab setting to use, when to carriage return a FROM and so on.&nbsp; Well, he cares and makes sure I know about it.&nbsp; I totally understand why but for me it was too time consuming to make sure I format something that in the end is a string variable&#8230;. Until I found <a href="http://www.sqlinform.com/">SQLinForm</a>.&nbsp; I am now a religious sql formatter, because not only does SQLinForm does it for me but it also creates c#, vb.net, php, and whole slew of other string variables.&nbsp; My SQL has never been prettier and I can finally ship sql to my dba.</p>
<p>&nbsp;</p>
<p><a href="http://www.techtoolblog.com//wp-content/uploads/2007/07/image2.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="165" alt="image" src="http://www.techtoolblog.com//wp-content/uploads/2007/07/image_thumb2.png" width="240" border="0"></a></p>
<p><a href="http://sharethis.com/item?&wp=2.3.1&amp;publisher=24accfc2-4cf2-46ea-abf6-c137f8fa267d&amp;title=SQL+Formatter&amp;url=http%3A%2F%2Fwww.techtoolblog.com%2Farchives%2Fsql-formatter">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.techtoolblog.com/archives/sql-formatter/feed</wfw:commentRss>
		</item>
		<item>
		<title>Stored Procedures vs Ad Hoc SQL</title>
		<link>http://www.techtoolblog.com/archives/stored-procedures-vs-ad-hoc-sql</link>
		<comments>http://www.techtoolblog.com/archives/stored-procedures-vs-ad-hoc-sql#comments</comments>
		<pubDate>Fri, 01 Jun 2007 19:49:05 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[asp.net]]></category>

		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.techtoolblog.com/archives/stored-procedures-vs-ad-hoc-sql</guid>
		<description><![CDATA[Stored procedures debate from my point of view:
Pros of using Stored Procedures

Cleaner code.&#160; Thousand lines of logic and sql statements can be traded in for hundreds.
Push more work to someone else besides developer.&#160; If you have a dedicated DB guy, this can really help&#160;in your timing.&#160;
Put much more logic into Stored Procedure then Ad Hoc [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Stored Procedures vs Ad Hoc SQL", url: "http://www.techtoolblog.com/archives/stored-procedures-vs-ad-hoc-sql" });</script>]]></description>
			<content:encoded><![CDATA[<p>Stored procedures debate from my point of view:</p>
<p><strong>Pros of using Stored Procedures</strong></p>
<ul>
<li>Cleaner code.&nbsp; Thousand lines of logic and sql statements can be traded in for hundreds.
<li>Push more work to someone else besides developer.&nbsp; If you have a dedicated DB guy, this can really help&nbsp;in your timing.&nbsp;
<li>Put much more logic into Stored Procedure then Ad Hoc SQL
<li><strike>Faster.</strike> Ok, maybe a little bit, but with processing power and RAM does this really matter anymore?
<li>Permissions are centralized and encompassed.
<li>Trips to the database server can be reduced.</li>
</ul>
<p><strong>Cons of using Stored Procedures</strong></p>
<ul>
<li>Much harder to debug.&nbsp; No UI debugger, stepping thru the code.&nbsp;
<li>Harder to tell were errors lie. Does this lie at the stored procedure or my code calling it?&nbsp; Plus the error codes returned by SQL are cryptic - &#8220;Error 512 was called&#8221; - Oh yeah, good old error 512.
<li>Parameter list can be really long, which takes away from the cleaner code.
<li>&#8220;<a href="http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx">Stored procedures also will open up a maintenance problem. The reason for this is that they form an API by themselves.&#8221;</a>&nbsp;This is the main point that causes me to stay away from Stored Procedures.</li>
</ul>
<p>I&#8217;m not entirely sure which side of the fence I lie.&nbsp; Right now I&#8217;m more comfortable with <strong>not</strong> using stored procedures because of the maintenance factor.&nbsp; I really think <a href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx">LINQ</a> is going to make stored procedures deprecated.</p>
<p>.NET specific - Here is a nice line of code to keep around when working with stored procedures that I end up using when getting the the dreaded &#8220;Parameters do not match&#8221; error.&nbsp; You can put this on your datasource Inserting Event.</p>
<p><!--<br />
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;}??\fs20 \cf1 For\cf0  x \cf1 As\cf0  \cf1 Integer\cf0  = 0 \cf1 To\cf0  e.Command.Parameters.Count - 1\par ??            Trace.Write(e.Command.Parameters(x).ParameterName)\par ??            Trace.Write(e.Command.Parameters(x).Value)\par ??        \cf1 Next}<br />
-->
<div style="font-size: 10pt; background: white; color: black; font-family: consolas">
<p style="margin: 0px"><span style="color: blue">For</span> x <span style="color: blue">As</span> <span style="color: blue">Integer</span> = 0 <span style="color: blue">To</span> e.Command.Parameters.Count - 1</p>
<p style="margin: 0px">Trace.Write(e.Command.Parameters(x).ParameterName)</p>
<p style="margin: 0px">Trace.Write(e.Command.Parameters(x).Value)</p>
<p style="margin: 0px"><span style="color: blue">Next</span></p>
</div>
<p><a href="http://sharethis.com/item?&wp=2.3.1&amp;publisher=24accfc2-4cf2-46ea-abf6-c137f8fa267d&amp;title=Stored+Procedures+vs+Ad+Hoc+SQL&amp;url=http%3A%2F%2Fwww.techtoolblog.com%2Farchives%2Fstored-procedures-vs-ad-hoc-sql">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.techtoolblog.com/archives/stored-procedures-vs-ad-hoc-sql/feed</wfw:commentRss>
		</item>
		<item>
		<title>Navicat Review</title>
		<link>http://www.techtoolblog.com/archives/navicat-review</link>
		<comments>http://www.techtoolblog.com/archives/navicat-review#comments</comments>
		<pubDate>Thu, 26 Apr 2007 19:02:58 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.techtoolblog.com/archives/navicat-review</guid>
		<description><![CDATA[I do a good amount of work in MySQL so that I need a good database admin tool.&#160; I come from a Microsoft Enterprise Manager/Management Studio background&#160;so much of this review compares to that as a benchmark.
The Good

Import/Export Data feature rocks.&#160; Much easier to use then DTS for simple imports &#38; exports&#160;&#38; supports multiple formats [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Navicat Review", url: "http://www.techtoolblog.com/archives/navicat-review" });</script>]]></description>
			<content:encoded><![CDATA[<p>I do a good amount of work in MySQL so that I need a good database admin tool.&nbsp; I come from a Microsoft Enterprise Manager/Management Studio background&nbsp;so much of this review compares to that as a benchmark.</p>
<h2>The Good</h2>
<ul>
<li>Import/Export Data feature rocks.&nbsp; Much easier to use then DTS for simple imports &amp; exports&nbsp;&amp; supports multiple formats (db, dbf, txt, html, xls, wk1, wq1, xml, mdb, ODBC)
<li>Dump as SQL.&nbsp; Will write out your table to .sql file with the full inserts.&nbsp; Microsoft so needs this.
<li>Maintain Tables.&nbsp; Easily able to
<li>Backups.&nbsp; Straight forward step by step.
<li>Saved Queries.&nbsp; Navicat saves then within the application at the&nbsp;database level&nbsp;not a sql file, this makes finding queries much faster.
<li>Scheduled Job.&nbsp; Again straight forward step by step
<li>Manage Users.&nbsp; They make it as simple as MySQL can be (which isn&#8217;t that simple sense you have to create a user multiple times to have access from localhost and from anywhere)
<li>Data Transfers.&nbsp; Their version of DTS, not as robust but gets the job done.</li>
</ul>
<h2>The Bad</h2>
<ul>
<li>Query Windows.&nbsp; This is my biggest&nbsp;complaint of Navicat and almost a show stopper for me. Tabbed windows are great BUT having multiple tabs within tabs causes my eye to lose focus of which tab I need.&nbsp; Not good for quick tabbing, I have to think before clicking which slows me down. I much prefer how Management Studio has tabs for queries but shows results at the bottom of that window.</li>
</ul>
<p>&nbsp;<a href="http://www.techtoolblog.com//wp-content/uploads/2007/04/WindowsLiveWriter/NavicatReview_71C2/image03.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="104" src="http://www.techtoolblog.com//wp-content/uploads/2007/04/WindowsLiveWriter/NavicatReview_71C2/image02.png" width="240" border="0"></a> </p>
<ul>
<li>Query Builder.&nbsp; I do most of my SQL by hand so this doesn&#8217;t effect me to much but Navicat&#8217;s query builder uses the dreaded Grave `instead of the Quote &#8216;.&nbsp; So if you use their query builder to get a sql statement started, maintaining it could be a nightmare.
<li>Designer. Seems clunky and implemented as a second thought.&nbsp; Big improvements here.</li>
</ul>
<p>Overall Navicat is the most feature rich MySQL tool on the market (I&#8217;ve tried ~4 so far). Pricing is at $139, well within reason. Besides a reworking of the query window, Navicat is a finely tuned.&nbsp; 2 TechToolBlog thumbs up.</p>
<p><a href="http://sharethis.com/item?&wp=2.3.1&amp;publisher=24accfc2-4cf2-46ea-abf6-c137f8fa267d&amp;title=Navicat+Review&amp;url=http%3A%2F%2Fwww.techtoolblog.com%2Farchives%2Fnavicat-review">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.techtoolblog.com/archives/navicat-review/feed</wfw:commentRss>
		</item>
		<item>
		<title>Scripting a MS SQL Database</title>
		<link>http://www.techtoolblog.com/archives/scripting-a-ms-sql-database</link>
		<comments>http://www.techtoolblog.com/archives/scripting-a-ms-sql-database#comments</comments>
		<pubDate>Fri, 12 Jan 2007 14:46:08 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.techtoolblog.com/archives/scripting-a-ms-sql-database</guid>
		<description><![CDATA[One thing I love about Navicat is the ability to give me the raw SQL in a backup, something that Microsoft Management Studio lacks big time.  I found this great Code Project article/application that does this perfectly.
http://www.codeproject.com/dotnet/ScriptDatabase.asp
<script type="text/javascript">SHARETHIS.addEntry({ title: "Scripting a MS SQL Database", url: "http://www.techtoolblog.com/archives/scripting-a-ms-sql-database" });</script>]]></description>
			<content:encoded><![CDATA[<p>One thing I love about Navicat is the ability to give me the raw SQL in a backup, something that Microsoft Management Studio lacks big time.  I found this great Code Project article/application that does this perfectly.</p>
<p><a href="http://www.codeproject.com/dotnet/ScriptDatabase.asp">http://www.codeproject.com/dotnet/ScriptDatabase.asp</a></p>
<p><a href="http://sharethis.com/item?&wp=2.3.1&amp;publisher=24accfc2-4cf2-46ea-abf6-c137f8fa267d&amp;title=Scripting+a+MS+SQL+Database&amp;url=http%3A%2F%2Fwww.techtoolblog.com%2Farchives%2Fscripting-a-ms-sql-database">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.techtoolblog.com/archives/scripting-a-ms-sql-database/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

