<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WebProNews &#187; SQL</title>
	<atom:link href="http://www.webpronews.com/tag/sql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webpronews.com</link>
	<description>Breaking News in Tech, Search, Social, &#38; Business</description>
	<lastBuildDate>Sun, 12 Feb 2012 16:41:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Yahoo Adds Capabilities to YQL</title>
		<link>http://www.webpronews.com/yahoo-adds-capabilities-to-yql-2009-07</link>
		<comments>http://www.webpronews.com/yahoo-adds-capabilities-to-yql-2009-07#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:11:32 +0000</pubDate>
		<dc:creator>Chris Crum</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Yahoo]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=50585</guid>
		<description><![CDATA[<p>Last year, Yahoo debuted its YQL language, which lets users query, filter, and join data across web data sources or services on the web. YQL or Yahoo Query Language is based on a SQL-like language, and it helps apps run faster with fewer lines of code. <br />
<br />
Today, Yahoo announced a new feature for YQL, and that is the Insert/Update/Delete feature. A spokesperson for Yahoo tells WebProNews this extends the platform by adding &#8220;write&#34; capability to its capabilities, including YQL Open Data Tables and Execute.&#34;</p>]]></description>
			<content:encoded><![CDATA[<p>Last year, Yahoo debuted its YQL language, which lets users query, filter, and join data across web data sources or services on the web. YQL or Yahoo Query Language is based on a SQL-like language, and it helps apps run faster with fewer lines of code. </p>
<p>Today, Yahoo announced a new feature for YQL, and that is the Insert/Update/Delete feature. A spokesperson for Yahoo tells WebProNews this extends the platform by adding &ldquo;write&quot; capability to its capabilities, including YQL Open Data Tables and Execute.&quot;</p>
<p><center><a href="http://developer.yahoo.com/yql/"><img title="YQL" alt="YQL" src="http://images.ientrymail.com/webpronews/article_pics/yql.jpg" /></a></center></p>
<p>If you&#8217;re interested in seeing some examples of how the new feature can be utilized, Yahoo has a blog post up about it that shows some things it can do. </p>
<p>One thing it can be used for is to bring some Twitter integration to your blog. &quot;This enables YQL&#8217;s Open Data Tables to insert new Twitter status messages, not just list them; to add new comments to a blog, as well as read them; to store data in a remote database; to INSERT INTO internet,&quot; <a href="http://developer.yahoo.net/blog/archives/2009/07/yql_insert.html">says Jonathan Trevor</a> of the YQL Team. </p>
<p>&quot;If you&#8217;ve developed some Open Data Tables already and the source supports some type of update, you might want to take this opportunity to go back and add the capability in,&quot; he says. </p>
<p>Documentation is available <a href="http://developer.yahoo.com/yql/guide/yql-iud-statements.html">here</a> for developers. To get a better understanding of what you can do, keep an eye on <a href="http://developer.yahoo.net/blog/">Yahoo&#8217;s developer blog</a>. Besides the aforementioned post, Trevor says more examples and demos will be covered in the coming weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/yahoo-adds-capabilities-to-yql-2009-07/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert a MySQL Injection Script for Use in Microsoft SQL Server</title>
		<link>http://www.webpronews.com/convert-a-mysql-injection-script-for-use-in-microsoft-sql-server-2007-01</link>
		<comments>http://www.webpronews.com/convert-a-mysql-injection-script-for-use-in-microsoft-sql-server-2007-01#comments</comments>
		<pubDate>Tue, 23 Jan 2007 21:13:46 +0000</pubDate>
		<dc:creator>Lucas Green</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Injection]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=34694</guid>
		<description><![CDATA[MySQL Server is the most widely used database management system in the world, primarily because it is open source and free.
]]></description>
			<content:encoded><![CDATA[<p>MySQL Server is the most widely used database management system in the world, primarily because it is open source and free.</p>
<p>Hence, most databases you may get from outside sources will probably be in the form of a MySQL injection script. This is fine if you use MySQL for your own website databases, but if you use Microsoft SQL Server the script will require a little editing before it will work.</p>
<p>The first thing you&#8217;ll need to do is remove any comment lines from the script. MySQL comment lines begin with a pound character (&#8220;#&#8221;) and MSSQL comment lines begin with a double dash (&#8220;&#8211;&#8221;), which makes them completely incompatible and will product a syntax error if you try to import a MySQL injection as-is into MSSQL Server. So to get started, open up Query Analyzer if you haven&#8217;t already (the easiest way to run scripts in MSSQL Server), load up the injection script you are working with, and remove any comment lines (look for the pound symbol). It is easier just to remove them than it is to try and convert them to propery MSSQL syntax, and they are just comment lines anyway so it won&#8217;t affect anything.</p>
<p>The bulk of your script will most likely be a series of INSERT statements, and these aren&#8217;t very different in MSSQL as compared to MySQL. However, your script may also include at the beginning a small section that creates the database table where the data will be inserted, and this CREATE TABLE statement is likely to be VERY different in MSSQL, depending on how complicated it is (there could be primary and secondary keys, constraints, even triggers &#8212; the more of these the more the syntax changes from MySQL to MSSQL). Since this is likely to give you the most trouble, it is recommended that you create the database tables manually in Enterprise Manager rather than trying to convert the syntax of the script snippet. Looking at the code, you should be able to easily identify the fields and their types (such as int, varchar, text, etc). Once you have the database table created in Enterprise Manager, delete the snippet of code from the injection script that deals with the creation of the table.</p>
<p>Now all that remains is to convert the INSERT statements to the proper syntax for MSSQL Server. There are a few different steps to accomplish this, but none of them are very complicated. The first difference in syntax between MySQL and MSSQL is that in MySQL, all statements must end with a semicolon (&#8220;;&#8221;). In MSSQL, this is a syntax error. The easiest way to remove these semicolons is to do a search and replace, and since the INSERT statements should be passing a series of values for each record of data, each line of the MySQL script will most likely end with a paranthesis and semicolon (&#8220;);&#8221;). So, do a search and replace and replace all instances of &#8220;);&#8221; with just the parenthesis &#8220;)&#8221;.</p>
<p>Another difference that you will have to correct for is that your MySQL injection script will most likely use an acute accent / reverse apostrophe (ANSI character 180) around the table name on each line. In MSSQL Server, you can encapsulate an object&#8217;s name (such as a table&#8217;s) with either square brackets (&#8220;[" and "]&#8220;) or nothing at all. However, you probably don&#8217;t want to do a blanket search-and-replace of the reverse apostrophe character, because that character might be used in the data of each record (especially if the data contains text, such as an article body). The easiest way to correct for this difference in syntax, then, is to do another search and replace, and replace all instances of the reverse apostrophe AND the table name, for example &#8220;`articles`&#8221; with just the table name &#8220;articles&#8221;.</p>
<p>Finally, there will also be numerous occurrences of apostrophes throughout the text fields of the data, and the apostrophe character is used to encapsulate strings in the script. In MySQL, the way to escape an apostrophe so that the script knows it is part of the text and not the end of the string, is to use a backslash followed by the apostrophe (&#8220;&#8216;&#8221;). In a MSSQL Server script, the proper way to escape an apostrophe is to use a double apostrophe (&#8220;&#8221;&#8221;). So, one more search and replace is called for &#8212; this time, replace all instances of ['] with [''] (double apostrophe, NOT an actual quotation mark).</p>
<p>Once these steps are all complete, you are ready to run the script! There shouldn&#8217;t be any other syntax changes you&#8217;ll have to make, but don&#8217;t worry if there are because when you execute the injection script it will tell you if there are any errors. If everything was corrected properly and there are no errors, you should get a series of &#8220;1 row(s) affected&#8221; responses &#8212; one for each INSERT statement in the script. If you want to verify that the proper number of records are in the database table, you can execute a &#8220;select count(*) from tablename&#8221; statement to count the rows of the table &#8212; it should match the number of lines in the injection script, give or take a few for blank lines, etc.</p>
<p>That&#8217;s it! Your options are now increased tremendously, because now you can use either MySQL or MSSQL injection scripts to import acquired databases into your database system. If you use MySQL as your dbms, you can do this process in reverse to convert a MSSQL injection script into a MySQL one. Either way, you now can import data using an injection script from either of the two most popular database management systems in the world. Now, where to obtain such databases or injection scripts is another question entirely, and beyond the scope of this article. Suffice it to say that there are numerous sources on the internet where you can purchase or acquire databases &#8212; a good one is www.WebContents.org. I think you will find that not only is it much easier to acquire content databases for your users than it is to build them from scratch, but it also is an easy way to add a lot of new, fresh content for your users with a minimal amount of time and effort. Using this method, you can get databases of articles, jokes, quotes, recipes, etc, and put them right on your website or any other database-integrated application, with very little work. Good luck! </p>
<p>Add to <a href="http://del.icio.us/post"onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.t  itle),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img src="http://images.ientrymail.com/webpronews/delicious-pic.png" border=0> Del.icio.us</a> | <a href="javascript:void   window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.   location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img   src="http://images.ientrymail.com/webpronews/digg-pic.png" border=0> Digg</a> | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img  src="http://images.ientrymail.com/webpronews/reddit.png" border=0>Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ '   '"><img src="http://images.ientrymail.com/webpronews/furl-pic.png" border=0> Furl</a> </p>
<p> Bookmark WebProNews: <a href="http://www.webpronews.com"><img src="http://images.ientrymail.com/webpronews/wpn-readit.jpg" border=0></a></p>
<p>This article was written by <a href="http://www.lucasgreen.com/">Lucas Green</a>, a professional private web developer who lives off his internet income. To visit his website and learn more about how he is creating multiple streams of passive income using the internet, please visit www.lucasgreen.com ! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/convert-a-mysql-injection-script-for-use-in-microsoft-sql-server-2007-01/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Triggers</title>
		<link>http://www.webpronews.com/sql-server-triggers-2006-12</link>
		<comments>http://www.webpronews.com/sql-server-triggers-2006-12#comments</comments>
		<pubDate>Tue, 19 Dec 2006 18:09:44 +0000</pubDate>
		<dc:creator>Chris Kemp</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=33844</guid>
		<description><![CDATA[Triggers are stored procedures which are fired when data is modified in an underlying table.
]]></description>
			<content:encoded><![CDATA[<p>Triggers are stored procedures which are fired when data is modified in an underlying table.</p>
<p>They can evaluate data being added to a table for validation purposes, or can make changes in that or other fields depending on the value of that data. You can use them even to execute a separate stored procedure, or to roll back a data modification or an entire transaction. </p>
<p>In earlier versions of SQL Server, triggers were used to maintain referential integrity. In current versions, constraints and foreign keys are used to accomplish much of those tasks, but triggers are still used to accomplish more complex tasks than that are available to the built in newer tools, such as complex column constraints, evaluation of tables in other databases, complicated defaults, or cascading routines involving multiple changes in multiple tables. </p>
<p>Triggers are created in the Enterprise Manager, or in the Query Analyzer through the object browser. There are also templates for triggers in the Query Analyzer (Edit|Insert Trigger). Triggers can be created with the following syntax: </p>
<p><code>CREATE TRIGGER trigger_name<br />
ON { table | view }<br />
[ WITH ENCRYPTION ]<br />
{<br />
&nbsp; &nbsp; &nbsp;    { { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         [ WITH APPEND ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         [ NOT FOR REPLICATION ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         AS<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         [ { IF UPDATE ( column )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;             [ { AND | OR } UPDATE ( column ) ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;                 [ ... n ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         | IF ( COLUMNS_UPDATED ( ) { bitwise_operator } updated_bitmask )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;                 { comparison_operator } column_bitmask [ ... n ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         } ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          sql_statement [ ... n ]<br />
&nbsp; &nbsp; &nbsp;     }<br />
} </code></p>
<p>There are two types of triggers: AFTER and INSTEAD OF. After triggers AFTER TRIGGERS fire after the data is changed, either by insert, delete, or update. If the data is inappropriate, as defined in the trigger, the modification can be rolled back to where it was before the data was modified. After triggers AFTER TRIGGERS cannot be placed on views, and cannot be used on more than one table. Also, the text, ntext, and image columns cannot be referenced in an after trigger. AFTER TRIGGERS. </p>
<p>After triggers AFTER TRIGGERS can be nested to 32 levels deep, and can be called recursively, again to 32 levels. </p>
<p>Instead of INSTEAD OF triggers make the validation before the modification. However, Instead of INSTEAD OF triggers CAN can be used on views. They do not allow recursion, and you can only have one Instead of INSTEAD OF trigger per table. And you cannot use an Instead of INSTEAD OF trigger with a cascade. </p>
<p><b>Resources </b></p>
<li> Information on Constraints and Triggers </li>
<p>This resource discusses about constraints and triggers in detail. </p>
<li>Information: Create Trigger </li>
<p>This resource is useful in understanding the workings of triggers in detail. </p>
<p>Tag: </p>
<p>Add to <a href="http://del.icio.us/post"  onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img  src=http://images.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> | <a href="javascript:void window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window. location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img src=http://images.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a> | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp onent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img  src=http://images.ientrymail.com/webpronews/reddit.png border=0>Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ ' '"><img src=http://images.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>Metro NY / NJ SQL Server Consultants <br />
We specialize is custom database software. Call us for a free consultation (973) 635 0080 or email us at <a href="http://www.paladn.com">paladn.com</a></p>
<p>Chris Kemp is a well known author in the field of Information Technology. His articles are very popular and well known in the various article banks across internet. His popular articles are about SQL Server, Database Design, IT Consulting and Software Development. </p>
<p>chriskemp@webpopularity.org </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/sql-server-triggers-2006-12/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL Server 2000 Data Types</title>
		<link>http://www.webpronews.com/sql-server-data-types-2006-12</link>
		<comments>http://www.webpronews.com/sql-server-data-types-2006-12#comments</comments>
		<pubDate>Tue, 05 Dec 2006 19:46:16 +0000</pubDate>
		<dc:creator>Chris Kemp</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=33411</guid>
		<description><![CDATA[SQL Server requires that each variable and column in a table should be defined with respect to the type of data it will store.
]]></description>
			<content:encoded><![CDATA[<p>SQL Server requires that each variable and column in a table should be defined with respect to the type of data it will store.</p>
<p>From a bit to a huge image and binary storage types, the allocation is supposed to help the user conform to the data required, and help the engine allocate space and processing speed efficiently. </p>
<p><b>Built-in data types </b></p>
<p>SQL Server 2000 recognizes the following built in data types: </p>
<p><b>Data Types </b><br />
Description </p>
<p><b>bigint </b><br />
Integer data from -2^63 through 2^63-1 </p>
<p><b>int </b><br />
Integer data from -2^31 through 2^31 &#8211; 1 </p>
<p><b>smallint </b><br />
Integer data from -2^15 through 2^15 &#8211; 1 </p>
<p><b>tinyint</b><br />
Integer data from 0 through 255 </p>
<p><b>bit </b><br />
Integer data with either a 1 or 0 value </p>
<p><b>decimal </b><br />
Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1 </p>
<p><b>numeric </b><br />
Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1 </p>
<p><b>money </b><br />
Monetary data values from -2^63 through 2^63 &#8211; 1 </p>
<p><b>smallmoney </b><br />
Monetary data values from -214,748.3648 through +214,748.3647 </p>
<p><b>float </b><br />
Floating precision number data from -1.79E + 308 through 1.79E + 308 </p>
<p><b>real </b><br />
Floating precision number data from -3.40E + 38 through 3.40E + 38 </p>
<p><b>datetime </b><br />
Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of 3.33 milliseconds </p>
<p><b>smalldatetime </b><br />
Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute </p>
<p><b>char </b><br />
Fixed-length character data with a maximum length of 8,000 characters </p>
<p><b>varchar </b><br />
Variable-length data with a maximum of 8,000 characters </p>
<p><b>text </b><br />
Variable-length data with a maximum length of 2^31 &#8211; 1 characters </p>
<p><b>nchar </b><br />
Fixed-length Unicode data with a maximum length of 4,000 characters </p>
<p><b>nvarchar</b><br />
Variable-length Unicode data with a maximum length of 4,000 characters </p>
<p><b>ntext </b><br />
Variable-length Unicode data with a maximum length of 2^30 &#8211; 1 characters </p>
<p><b>binary </b><br />
Fixed-length binary data with a maximum length of 8,000 bytes </p>
<p><b>varbinary</b><br />
Variable-length binary data with a maximum length of 8,000 bytes </p>
<p><b>image </b><br />
Variable-length binary data with a maximum length of 2^31 &#8211; 1 bytes </p>
<p><b>cursor </b><br />
A reference to a cursor </p>
<p><b>sql_variant </b><br />
A data type that stores values of various data types, except text, ntext, timestamp, and sql_variant </p>
<p><b>table </b><br />
A special data type used to store a result set for later processing </p>
<p><b>timestamp</b><br />
A database-wide unique number that gets updated every time a row gets updated </p>
<p><b>uniqueidentifier </b><br />
A globally unique identifier </p>
<p>Bigint, sql_variant, and table are new to SQL Server 2000 </p>
<p><b>User-defined data types </b></p>
<p>You can make user-defined data types too, which sometimes can be more descriptive of the value types held in the object. This may make it easier for the programmer to document and work with the data. These data types are based on the built in types, and can be outfitted with preprogrammed defaults, checks, constraints, etc. . To create a user-defined data type, use </p>
<p>sp_addtype datatypename, basedatatype, NULL&#8217;/'NOT NULL&#8217; </p>
<p><b>How to choose the appropriate data type </b></p>
<p>SQL Server stores data in data pages that are 8Kb (8192 bytes) in size. The system uses some of that s Sometimes, the system uses only 8060 bytes are availableto that are available to store user&#8217;s data. Consider the size of a row of data in your tables. If the rows are large, make sure that multiples of the fit conveniently on a data page so that page space is not wasted. This is cut down on disk paging overhead when accessing the data. You want to maximize the number of rows of data which that will fit on a page. This can be accomplished both by splitting the tables, and by choosing the smallest data type which that will accommodate your data. . </p>
<p>In you are using integer data, data; consider that the tinyint datatype will accommodate data which that will fit into one byte of storage. So if the range of all of the data in your field (or variable) is between 0 and 255, use the tinyint datatype. If the range is between -32,768 and 32,767, use the smallint data type. And if If you need to store integer data from -2,147,483,648 through 2,147,483,647, use int data type. </p>
<p>Similarly with smallmoney. If smallmoney. if your value range is between -214748.3648 and 214,748.3647, use the smallmoney datatype. </p>
<p>Use smalldatetime data type instead of datetime data type, if you need to store the date and time data from January 1, 1900 through June 6, 2079, with accuracy to the minute. </p>
<p>Prefer varchar.nvarchar to text/ntext whenever possible because the text and image fields are stored separately, which produces additional paging. And prefer char/varchar to nchar/nvarchar data types because the n types require twice as much storage space. The n types are used primarily for unicode data. </p>
<p><b>Resources</b> </p>
<p> Tutorial: SQL 7 &#038; Database Files<br />
This is a useful tutorial on SQL &#038; and database Files. </p>
<p> Information: Complete information on SQL<br />
This resource provides complete information on SQL. </p>
<p>Tag: </p>
<p>Add to <a href="http://del.icio.us/post"  onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img  src=http://images.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> | <a href="javascript:void window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window. location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img src=http://images.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a> | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp onent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img  src=http://images.ientrymail.com/webpronews/reddit.png border=0>Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ ' '"><img src=http://images.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>Metro NY / NJ SQL Server Consultants <br />
We specialize is custom database software. Call us for a free consultation (973) 635 0080 or email us at <a href="http://www.paladn.com">paladn.com</a></p>
<p>Chris Kemp is a well known author in the field of Information Technology. His articles are very popular and well known in the various article banks across internet. His popular articles are about SQL Server, Database Design, IT Consulting and Software Development. </p>
<p>chriskemp@webpopularity.org </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/sql-server-data-types-2006-12/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web App Vulnerabilities Over Buffer Overflows</title>
		<link>http://www.webpronews.com/web-app-vulnerabilities-over-buffer-overflows-2006-11</link>
		<comments>http://www.webpronews.com/web-app-vulnerabilities-over-buffer-overflows-2006-11#comments</comments>
		<pubDate>Fri, 03 Nov 2006 17:39:52 +0000</pubDate>
		<dc:creator>Pete Freitag</dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[Homepage]]></category>
		<category><![CDATA[Injection]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[MySpace]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=32568</guid>
		<description><![CDATA[This should be an eye opener to many. In September Mitre reported that web application vulnerabilities are claiming the top three spots on their <a href="http://cve.mitre.org/" class="bluelink">CVE</a> request list, beating out Buffer Overflows.
]]></description>
			<content:encoded><![CDATA[<p>This should be an eye opener to many. In September Mitre reported that web application vulnerabilities are claiming the top three spots on their <a href="http://cve.mitre.org/" class="bluelink">CVE</a> request list, beating out Buffer Overflows.</p>
<p>1. Cross Site Scripting (21.5%)</p>
<p>2. SQL Injection (14%)</p>
<p>3. PHP includes (9.5%)</p>
<p>4. Buffer overflows (7.9%)</p>
<p><a href="http://portal.spidynamics.com/blogs/msutton/archive/2006/09/26/How-Prevalent-Are-SQL-Injection-Vulnerabilities_3F00_.aspx" class="bluelink">Mike Sutton</a> wanted to know just how prevalent are SQL Injection Vulnerabilities? So he ran a little test, and found that out of 1000 web sites 11.3% of them were vulnerable!</p>
<p>I also heard this from Mike Andrews in his <a href="http://www.petefreitag.com/item/558.cfm" class="bluelink">How to Break Web Software</a> talk. He says that the number of buffer overflow vulnerabilities have been going down over the years as more people are aware of them, and there are lots of automated tools for finding them. But the number of web application vulnerabilities has been sky rocketing.</p>
<p>Buffer Overflows were first talked about in the 1970&#8242;s by the NSA, and they are still somewhat of a problem &#8211; do you think we will still be talking about Cross Site Scripting and SQL Injection in 30 years?</p>
<p><a href="http://www.petefreitag.com/item/593.cfm#postcomment" class="bluelink">Comments</a></p>
<p><b>Related Entries </b></p>
<p><a href="http://www.petefreitag.com/item/558.cfm" class="bluelink">How to Break Web Software</a> &#8211; April 21, 2006 </p>
<p><a href="http://www.petefreitag.com/item/499.cfm" class="bluelink">Top 20 Internet Security Vulnerabilities of 2005</a> &#8211; November 23, 2005 </p>
<p><a href="http://www.petefreitag.com/item/483.cfm" class="bluelink">MySpace Hacked with CSRF and XSS</a> &#8211; October 13, 2005 </p>
<p><a href="http://www.petefreitag.com/item/363.cfm" class="bluelink">Detecting SQL Injection with ScriptProtect</a> &#8211; May 18, 2005 </p>
<p><a href="http://www.petefreitag.com/item/362.cfm" class="bluelink">ScriptProtect in ColdFusion MX 7 not a catch all</a> &#8211; May 17, 2005 </p>
<p><a href="javascript:void   window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.   location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img   src=http://images.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a> | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp   onent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img  src=http://images.ientrymail.com/webpronews/reddit.png border=0>Reddit</a> | <a   href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ '   '"><img src=http://images.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a> </p>
<p><b><a href="http://www.petefreitag.com/item/593.cfm" class="bluelink">*Originally published at Pete Freitag&#8217;s Homepage.</a></b></p>
<p>Pete Freitag (<a href="http://www.petefreitag.com/">http://www.petefreitag.com/</a>) is a software engineer, and<br />
web developer located in central new york. Pete specializes in the<br />
HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete<br />
published the ColdFusion MX Developers Cookbook with SAMs Publishing.</p>
<p>Pete owns a Firm called Foundeo (<a href="http://foundeo.com/">http://foundeo.com/</a>) that specializes<br />
in Web Consulting, and Products for Web Developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/web-app-vulnerabilities-over-buffer-overflows-2006-11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source SQL Full Text Search Engine &#8211; Sphinx</title>
		<link>http://www.webpronews.com/open-source-sql-full-text-search-engine-sphinx-2006-11</link>
		<comments>http://www.webpronews.com/open-source-sql-full-text-search-engine-sphinx-2006-11#comments</comments>
		<pubDate>Thu, 02 Nov 2006 18:58:39 +0000</pubDate>
		<dc:creator>Pete Freitag</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Engine]]></category>
		<category><![CDATA[Homepage]]></category>
		<category><![CDATA[Indexing]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Sphinx]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Text]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=32543</guid>
		<description><![CDATA[I came across <a href="http://www.sphinxsearch.com/" class="bluelink">Sphinx</a> via the <a href="http://www.mysqlperformanceblog.com/" class="bluelink">MySQL Performance Blog</a> (which has some <a href="http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/" class="bluelink">good</a> <a href="http://www.mysqlperformanceblog.com/2006/10/16/should-mysql-and-web-server-share-the-same-box/" class="bluelink">entries</a> you might want to check out). It is an Open Source Full Text SQL Search Engine.
]]></description>
			<content:encoded><![CDATA[<p>I came across <a href="http://www.sphinxsearch.com/" class="bluelink">Sphinx</a> via the <a href="http://www.mysqlperformanceblog.com/" class="bluelink">MySQL Performance Blog</a> (which has some <a href="http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/" class="bluelink">good</a> <a href="http://www.mysqlperformanceblog.com/2006/10/16/should-mysql-and-web-server-share-the-same-box/" class="bluelink">entries</a> you might want to check out). It is an Open Source Full Text SQL Search Engine.</p>
<p>It can be installed as a storage engine type on MySQL, and from what I hear can beat the pants off of MySQL&#8217;s built-in full text search in some cases.</p>
<p>From the web site:<br />
<blockquote>Generally, it&#8217;s a standalone search engine, meant to provide fast, size-efficient and relevant fulltext search functions to other applications. Sphinx was specially designed to integrate well with SQL databases and scripting languages. Currently built-in data sources support fetching data either via direct connection to MySQL, or from an XML pipe. </p></blockquote>
<p>Here are some of the features:
<ul>
<li>high indexing speed (upto 10 MB/sec on modern CPUs) </li>
<li>high search speed (avg query is under 0.1 sec on 2-4 GB text collections) </li>
<li>high scalability (upto 100 GB of text, upto 100 M documents on a single CPU) </li>
<li>supports distributed searching (since v.0.9.6) </li>
<li>supports MySQL natively (MyISAM and InnoDB tables are both supported) </li>
<li>supports phrase searching </li>
<li>supports phrase proximity ranking, providing good relevance </li>
<li>supports English and Russian stemming </li>
<li>supports any number of document fields (weights can be changed on the fly) </li>
<li>supports document groups </li>
<li>supports stopwords </li>
<li>supports different search modes (&#8220;match all&#8221;, &#8220;match phrase&#8221; and &#8220;match any&#8221;) </li>
<li>generic XML interface which grealy simplifies custom integration </li>
</ul>
<p><b>Related Entries </b>
<ul>
<li><a href="http://www.petefreitag.com/item/477.cfm" class="bluelink">MySQL FULLTEXT Indexing and Searching</a> &#8211; September 29, 2005 </li>
<li><a href="http://www.petefreitag.com/item/553.cfm" class="bluelink">Updated SQL Reserved Words Checker</a> &#8211; March 28, 2006 </li>
<li><a href="http://www.petefreitag.com/item/466.cfm" class="bluelink">SQL to Select a random row from a database table</a> &#8211; September 14, 2005 </li>
<li><a href="http://www.petefreitag.com/item/430.cfm" class="bluelink">Insert Delayed with MySQL</a> &#8211; August 2, 2005 </li>
<li><a href="http://www.petefreitag.com/item/379.cfm" class="bluelink">Multiple Inserts with MySQL</a> &#8211; June 10, 2005 </li>
</ul>
<p><a href="http://www.petefreitag.com/item/592.cfm#postcomment" class="bluelink">Comments</a></p>
<p><b><a href="http://www.petefreitag.com/item/592.cfm" class="bluelink">*Originally published at Pete Freitag&#8217;s Homepage</a></b></p>
<p>Tag: </p>
<p>Add to <a href="http://del.icio.us/post" onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=clos   e&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(docum ent.title),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img src=http://images.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> | <a href="javascript:void   window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window. location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,locati   on=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img src=http://images.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a> | <a   href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp onent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img   src=http://images.ientrymail.com/webpronews/reddit.png border=0>Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeUR   IComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ ' '"><img src=http://images.ientrymail.com/webpronews/furl-pic.png border=0>   Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>Pete Freitag (<a href="http://www.petefreitag.com/">http://www.petefreitag.com/</a>) is a software engineer, and<br />
web developer located in central new york. Pete specializes in the<br />
HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete<br />
published the ColdFusion MX Developers Cookbook with SAMs Publishing.</p>
<p>Pete owns a Firm called Foundeo (<a href="http://foundeo.com/">http://foundeo.com/</a>) that specializes<br />
in Web Consulting, and Products for Web Developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/open-source-sql-full-text-search-engine-sphinx-2006-11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CLR vs T-SQL and Stored Procedures in SQL Server 2005</title>
		<link>http://www.webpronews.com/clr-vs-tsql-and-stored-procedures-in-sql-server--2006-09</link>
		<comments>http://www.webpronews.com/clr-vs-tsql-and-stored-procedures-in-sql-server--2006-09#comments</comments>
		<pubDate>Tue, 26 Sep 2006 16:03:54 +0000</pubDate>
		<dc:creator>Dmitry Tsuranoff</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[CLR]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=31690</guid>
		<description><![CDATA[CLR or TSQL? That is the question.
]]></description>
			<content:encoded><![CDATA[<p>CLR or TSQL? That is the question.</p>
<p>More are more developers are struggling to find the right answer, but the answer really depends on the developer&#8217;s individual needs. </p>
<p>For classic SQL tasks, the good old TSQL is recommended. On the other hand, CLR works best for calculations, parsing, image processing and other tasks that deal with a very limited amount of data. </p>
<p>We performed an experiment that defies the common perception that calculation tasks run several times faster when implemented in CLR form. For this experiment, we utilized a computer with Pentium 4 2.4GHZ processor and 1 Gb of RAM.</p>
<p>We created a very simple user defined function on T-SQL that adds two numbers. The function is found below:</p>
<p><code>CREATE FUNCTION FuncSum(@n1 INT, @n2 INT) RETURNS INT AS BEGIN RETURN @n1 + @n2 END</code></p>
<p>Then, we rewrote the same function using CLR this time. This looks a little bit more complicated.</p>
<p><code>using System; using Microsoft.SqlServer.Server;</p>
<p>public class TestProcedures { [Microsoft.SqlServer.Server.SqlFunction( IsDeterministic = true, DataAccess = DataAccessKind.Read )] [CLSCompliant( false )] public static int FuncSum_CLR(int n1, int n2) { return n1 + n2; } }</code></p>
<p>After which, we loaded them into our database:</p>
<p><code>CREATE ASSEMBLY SQL2005_Assembly FROM 'C:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\SQL2005_Assembly\bin\Release\SQL2005_Assembly.dll' WITH PERMISSION_SET = UNSAFE</p>
<p>CREATE FUNCTION FuncSum_CLR ( @n1 int, @n2 int ) RETURNS int AS EXTERNAL NAME SQL2005_Assembly.TestProcedures.FuncSum_CLR</code></p>
<p>We then ran the TSQL and CLR function 100,000 times over and compared the result:</p>
<p><code>CREATE PROCEDURE TestFuncSum(_CLR) AS BEGIN DECLARE @t datetime SET @t = getdate() DECLARE @n INT DECLARE @i INT SET @i = 0 WHILE (@i < 100000) BEGIN EXEC @n = FuncSum(_CLR) 1,1 SET @i = @i + 1 END SELECT datediff(ms, @t, getdate()) END</code></p>
<p>The results were revealing:</p>
<p>* TSQL: 2000ms * CLR: 6300ms</p>
<p>The experiment proved that CLR was running more than three times slower on a mere calculation task. Here's the explanation:</p>
<p>Obviously, it takes time for the SQL server to switch the context from the kernel to the CLR (.Net framework). This time in that experiment can be estimated using formula (6300-2000)/100000 = 0.042ms. It is almost nothing in comparison with other executions, remember, even SQL profiler does not detect time periods less then 13-16ms.</p>
<p>However, it might be important if you are using CLR functions in WHERE conditions or as a parameters to the aggregation functions, which are called thousands of times.</p>
<p>This overhead is the same for TSQL and CLR procedures.</p>
<p>The Mystery of 'Return'. Why SQL2005 is slower then SQL2000.</p>
<p>We continued on with our experiments that call almost empty procedures thousands of times over. The results are once again revealing.</p>
<p>Experiments are again done on a computer with Pentium 4 2.4GHz processor and 1Gb of RAM.</p>
<p>We created three procedures that do nothing. You read right, they do absolutely nothing.</p>
<p><code>CREATE PROCEDURE Proc_Return1 AS RETURN GO</p>
<p>CREATE PROCEDURE Proc_Return2 AS RETURN DECLARE @i INT SET @i = 0 GO</p>
<p>CREATE PROCEDURE Proc_Return3 AS RETURN 1 GO</code></p>
<p>In the second procedure, there were unreachable statements after the RETURN. They were not an error. We too thought that there is no difference, but we then called all three procedures 100K times:</p>
<p><code>CREATE PROCEDURE TestProc_Return1 AS BEGIN DECLARE @t datetime SET @t = getdate() DECLARE @i INT SET @i = 0 WHILE (@i < 100000) BEGIN EXEC Proc_Return(1/2/3) SET @i = @i + 1 END SELECT datediff(ms, @t, getdate()) END GO</code></p>
<p>And we got the following results:</p>
<p><code>SQL 2000 SQL 2005 EXEC TestProc_Return1 2120ms 1850 EXEC TestProc_Return2 1200ms 1850 EXEC TestProc_Return3 1300ms 1850</code></p>
<p>What do these results mean?</p>
<p>* Mysteriously, unreachable code after the RETURN helps it running faster. Only God and Microsoft know why, I don't have any logical explanation. It is believed that SET statements are more useful then the others. You can continue my experiments with the different statements and share the result. </p>
<p>* RETURN 1 also helps, and is twice faster than RETURN </p>
<p>* Finally, this mysterious behavior is fixed on SQL 2005... it is always running slow... </p>
<p>Now that is more important. Note: this is actually a case where SQL 2005 is running almost 2 times slower then SQL 2000 on the same code. And that can hurt on the production! Is it the only case? No, we will continue the investigation.</p>
<p>Tag: </p>
<p>Add to <a href="http://del.icio.us/post"onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURICo  mponent(location.href)+'&#038;title ='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return   false;" CLASS="printMailTop"><img src=http://images1.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> |   <a  href="javascript:voidwindow.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.location.href)+'&#038;ei=UTF-8','  popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img   src=http://images1.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a>  | <a href="javascript:void   window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&#038;u='+encodeURICompo  nent(window.location.href),'popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)   "><img src=http://images1.ientrymail.com/webpronews/yahoo-pic.png border=0> Yahoo! My Web</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeUR  IComponent(document.title)+' '"><img src=http://images1.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>http://www.lakesidesql.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/clr-vs-tsql-and-stored-procedures-in-sql-server--2006-09/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Practice Makes Perfect For SQL</title>
		<link>http://www.webpronews.com/practice-makes-perfect-for-sql-2006-09</link>
		<comments>http://www.webpronews.com/practice-makes-perfect-for-sql-2006-09#comments</comments>
		<pubDate>Tue, 12 Sep 2006 18:11:16 +0000</pubDate>
		<dc:creator>WebProNews Staff</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Sheeri Kritzer]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=31432</guid>
		<description><![CDATA[MySQL guru Sheeri Kritzer listed eight SQL best practices for database professionals who are hard at work on their projects.
]]></description>
			<content:encoded><![CDATA[<p>MySQL guru Sheeri Kritzer listed eight SQL best practices for database professionals who are hard at work on their projects.</p>
<table width="128" border="0" align="right">
<tr>
<td width="122" height="62"><a href="http://www.webproworld.com/viewtopic.php?p=323159"><img src="http://images.ientrymail.com/CommentImage-4.gif" width="130" height="60" border="0"></a></td>
</tr>
</table>
<p>Kritzer&#8217;s <a href=http://sheeri.com/archives/104 class=bluelink>list</a> began with a preface on why she tries to live by the eight SQL rules in her post about best practices:</p>
<p><i>
<div style=margin-left:10px; margin-right:10px>In declarative languages like SQL, you program what you want the result to be, not the procedure to get it. For instance, &#8220;give me all the people with the first name starting with the letter S from a certain table.&#8221; </p>
<p>Unlike procedural programming (or even methods in object-oriented languages), you do not say how to get the information. This is, I believe, why many developers want to give the query optimizer &#8220;hints&#8221; on how to do its job.</p></div>
<p></i><br />
Kritzer started the list by suggesting database developers always use explicit joins. &#8220;If I mean INNER JOIN, then I use INNER JOIN. No use of just plain &#8220;JOIN&#8221;. Never, ever, ever use a comma join &#8211; I consider that a mistake,&#8221; she wrote.</p>
<p>One person asked about that practice in a comment about the post. Peter Zaitsev of the <a href=http://www.mysqlperformanceblog.com/ class=bluelink>MySQL Performance Blog</a> said this:</p>
<p><i>
<div style=margin-left:10px; margin-right:10px>I personally feel this is syntax matter, unless you use LEFT JOIN. Some people find it more readable, some not &#8211; I would for example like to see clauses grouped by tables as for inner join there is no difference between where and on clauses for optimizer and I prefer to see how query can be executed easily.</div>
<p></i><br />
Kritzer agreed in her response that the use of explicit joins is definitely syntax. &#8220;I feel that specifying INNER vs. LEFT or RIGHT or CROSS helps them understand that they&#8217;re not saying &#8220;I want you to join the tables,&#8221; ie, take an action, they&#8217;re saying, &#8220;I want the result if you join the tables this way,&#8221; ie, &#8220;this is what I want back.&#8221;</div>
<p></i><br />
Database pros should not be afraid of JOINS. If good indexing has been used for the database, Krtizer said JOINS are not necessarily resource-intensive. And when a correlated subquery can be replaced with a JOIN, it should be replaced.</p>
<p>Developers should also always define field names. &#8220;No using SELECT * or INSERT INTO table VALUES. It&#8217;s a pain,&#8221; she wrote. For reporting, always use the timestamp from the database server, in case those of web servers are different.</p>
<p>Reporting will go more smoothly if one stores IPs as integers with INET_ATON and retrieves them with INET_NTOA, Kritzer also wrote. On the topic of reporting, she considered the impact of network traffic and made this best practice suggestion:</p>
<p><i>
<div style=margin-left:10px; margin-right:10px>If you&#8217;re going to receive information, it&#8217;s better to receive in chunks, which will likely be larger than a logical piece. For instance, state reporting &#8211; instead of making 50 connections for states in the US, get them all at once. </p>
<p>If the dataset is very large and folks do not want to stare at a blank page while the report is loading, use paging with LIMIT to grab, say, 1000 entries at a time and display them on the screen so people can start looking at the data while the rest is being grabbed.</p></div>
<p></i><br />
&#8220;Running a query in a loop is usually a bad idea,&#8221; Kritzer said of those. &#8220;Consider building a query string using UNION and executing it at the end of the loop, so you can execute multiple queries with only one trip across the network to the database.&#8221;</p>
<p>&#8212;</p>
<p>Add to <a href="http://del.icio.us/post" onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return false;" CLASS="printMailTop"><img src=http://images1.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> | <a href="javascript:void window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img src=http://images1.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a>  | <a href="javascript:void window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&#038;u='+encodeURIComponent(window.location.href)+'&#038;tag=Sheeri Kritzer,SQL,Best Practices','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img src=http://images1.ientrymail.com/webpronews/yahoo-pic.png border=0> Yahoo! My Web</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+' '"><img src=http://images1.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a> </p>
<p><script language=JavaScript src="http://aj.600z.com/aj/1095/0/vj?z=1&#038;dim=1088&#038;pos=15"></script></p>
<p>David Utter is a staff writer for WebProNews covering technology and business. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/practice-makes-perfect-for-sql-2006-09/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Turbo Manager and Dream Coder</title>
		<link>http://www.webpronews.com/mysql-turbo-manager-and-dream-coder-2006-08</link>
		<comments>http://www.webpronews.com/mysql-turbo-manager-and-dream-coder-2006-08#comments</comments>
		<pubDate>Mon, 14 Aug 2006 16:12:11 +0000</pubDate>
		<dc:creator>Groshan Fabiola</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dream Coder]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Turbo Manager]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=30885</guid>
		<description><![CDATA[The success and the longevity of any prominent business nowadays depend on powerful application infrastructures and effective, reliable management and development solutions.
]]></description>
			<content:encoded><![CDATA[<p>The success and the longevity of any prominent business nowadays depend on powerful application infrastructures and effective, reliable management and development solutions.</p>
<p>In present, a wide range of IT companies are striving to provide business owners with better application management and new, state-of-the-art development solutions and tools, vital for increasing productivity and facilitating process development for any business. In order to improve the overall performance of commonly used application servers, and to enhance the efficiency of specific application programs, more and more IT companies are currently aiming to develop new, competitive software programs that support popular, commonly used databases. Such software products offer an extended set of features that help businesses implement better management and development solutions and also considerably reduce the time, effort and costs of process development. </p>
<p>Most software products implement support for MySQL databases, providing users with a complete set of improved administration and development solutions. Enhancing and correcting the features provided by the popular MySQL Manager application, MySQL Turbo Manager is by far the best software solution for MySQL database management, administration and development in present. The small MySQL Manager application included by Mac OS X Server provides users with a GUI interface for a set of basic actions. However, the standard MySQL Manager application can&#8217;t effectively meet today&#8217;s requirements, users needing more powerful and complex applications for creating, managing and interacting with various databases. </p>
<p>MySQL Turbo Manager accounts for the minuses of the regular MySQL Manager application, also implementing new reliable features that account for all the issues of an effective process development. MySQL Turbo Manager is nowadays considered to be a very powerful and easy to use administration tool, successfully meeting the requirements of a wide range of businesses. MySQL Turbo Manager is an effective MySQL Front End, a Graphical User Interface (GUI) Server for MySQL, renowned as the most reliable administration tool in present.</p>
<p>Similar to MySQL Turbo Manager, Dream Coder is a very effective Front End for Oracle database, regarded as a powerful PL/SQL IDE by a large number of businesses from various fields of activity. Dream Coder for Oracle is undoubtedly the most effective PL/SQL IDE (Integrated Development Environment), greatly reducing the time and costs required by the development process. With the help of Dream Coder for Oracle databases, PL/SQL developers can now browse trough a more intuitive and user-friendly GUI and perform various tasks with a minimal investment of time and effort. </p>
<p>Dream Coder for Oracle is a complete software product, providing PL/SQL developers with an extensive set of features such as building and executing queries, creating and executing scripts, creating and modifying database objects, user session monitoring, database monitoring and many more. Along with MySQL Turbo Manager, Dream Coder for Oracle is nowadays a highly requested software product, greatly facilitating process development and improving productivity with a small investment of time and effort.</p>
<p>Tag: </p>
<p>Add to <a   href="http://del.icio.us/post"onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURICo  mponent(location.href)+'&#038;title ='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return   false;" CLASS="printMailTop"><img src=http://images1.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> |   <a       href="javascript:voidwindow.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.location.href)+'&#038;ei=UTF-8','  popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img   src=http://images1.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a>  | <a href="javascript:void   window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&#038;u='+encodeURICompo  nent(window.location.href),'popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)   "><img src=http://images1.ientrymail.com/webpronews/yahoo-pic.png border=0> Yahoo! My Web</a> | <a   href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeUR  IComponent(document.title)+' '"><img src=http://images1.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a><br />
<script language=JavaScript src="http://aj.600z.com/aj/1095/0/vj?z=1&#038;dim=1088&#038;pos=15"></script></p>
<p>So if you want to find out more information about <a href="htp://www.mentattech.com/">MySQL Front End</a> or about <a href="http://www.mentattech.com/">PL/SQL Developer</a>, or even about <a href="http://www.mentattech.com/">PL/SQL IDE</a> please click these links.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/mysql-turbo-manager-and-dream-coder-2006-08/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Replication</title>
		<link>http://www.webpronews.com/sql-replication-2006-08</link>
		<comments>http://www.webpronews.com/sql-replication-2006-08#comments</comments>
		<pubDate>Tue, 01 Aug 2006 14:16:22 +0000</pubDate>
		<dc:creator>Jatin Chawla</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=30659</guid>
		<description><![CDATA[Database management systems are very important for business today. Whether your application has a network access to all employees in your organization or whether it's a web application.
]]></description>
			<content:encoded><![CDATA[<p>Database management systems are very important for business today. Whether your application has a network access to all employees in your organization or whether it&#8217;s a web application.</p>
<p>The more the number of users supported by the application the more will be the load on the server to act on their requests. Especially in cases of a web application, the location of the server plays an important role because unlike your inhouse application a web application may have users from all around the globe. Managing data for such huge number of users on one centralized server become very difficult. You may face the following problems. </p>
<p>* Performance: since there are huge number of users accessing your database it may slow down in executing requests. </p>
<p>* Consistency: incase the server goes down, people accessing your service will remain temporarily disconnected until they server is up and running.</p>
<p>SQL Replication is the answer to this problem. SQL Replication can be defined as a process of sharing data across different networks or different locations. It creates copies of database and these copies are shared with among different network and locations. The users accessing that network will make changes to this copy of data which will be later synchronized with the original database. Advantages of SQL Replication over a centralized server approach are: </p>
<p>* It provides more consistency for user who can now access their local copy of data even if the original server is temporarily not working. </p>
<p>* SQL Replication can be a sort of data recovery tool if you happen to loose your data by theft, fire or other natural disasters. You still have a copy of your database which will keep your service running. </p>
<p>* By replicating data on network servers the load on the central server is decreased which reduces network traffic. </p>
<p>* It provides excellent synchronization technique that synchronizes all the replication data with the original database. </p>
<p>Tag: </p>
<p>Add to <a   href="http://del.icio.us/post"onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURICo  mponent(location.href)+'&#038;title ='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return   false;" CLASS="printMailTop"><img src=http://images1.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> |   <a       href="javascript:voidwindow.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.location.href)+'&#038;ei=UTF-8','  popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img   src=http://images1.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a>  | <a href="javascript:void   window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&#038;u='+encodeURICompo  nent(window.location.href),'popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)   "><img src=http://images1.ientrymail.com/webpronews/yahoo-pic.png border=0> Yahoo! My Web</a> | <a   href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeUR  IComponent(document.title)+' '"><img src=http://images1.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a><br />
<script language=JavaScript src="http://aj.600z.com/aj/1095/0/vj?z=1&#038;dim=1088&#038;pos=15"></script></p>
<p>This article is published by content writer of Search Influence Inc, US based SEO company on behalf of <a href="http://www.globaldatavault.com">http://www.globaldatavault.com</a>. For more information about Global Data Vault can be retrieved by visiting <a href="http://www.globaldatavault.com/sql-replication.html'>http://www.globaldatavault.com/sql-replication.html</a>. All the visitor&#8217;s and reader&#8217;s feedbacks are welcomed diligently at this email marketing@searchinfluence.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/sql-replication-2006-08/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 1/67 queries in 0.763 seconds using memcached
Object Caching 617/802 objects using memcached

Served from: webpronews.com @ 2012-02-12 11:44:36 -->
