<?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>StrApp Knowledge Management</title>
	<atom:link href="http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://strappcenter.net/StrApp-Knowledge-Management</link>
	<description></description>
	<lastBuildDate>Thu, 22 Mar 2012 07:25:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Magento Sales Order Report Not Working</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=209</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=209#comments</comments>
		<pubDate>Thu, 22 Mar 2012 07:25:49 +0000</pubDate>
		<dc:creator>vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=209</guid>
		<description><![CDATA[If the magento sales order report doesnt display records, even though there are records &#8211; need to refresh the statistics &#8211; for which there&#8217;s a link on the report page &#8211; and refresh the statistics and that fixes the issue]]></description>
			<content:encoded><![CDATA[<p>If the magento sales order report doesnt display records, even though there are records &#8211; need to refresh the statistics &#8211; for which there&#8217;s a link on the report page &#8211; and refresh the statistics and that fixes the issue</p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=209</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>11/11/2010 Friday Meeting &#8211; Key Points</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=200</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=200#comments</comments>
		<pubDate>Fri, 19 Nov 2010 05:58:09 +0000</pubDate>
		<dc:creator>akshay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=200</guid>
		<description><![CDATA[1.A new Development Tracking Sheet has been introduced where developers state the development time and code re-use time of their developed modules such as search engines, forms and so on. The Development Tracking Sheet assists in the re-use of the already developed module by merely customizing the module to meet the requirement. The Development Tracking [...]]]></description>
			<content:encoded><![CDATA[<p>1.A new <em>Development Tracking Sheet</em> has been introduced where developers state the development time and code re-use time of their developed modules such as search engines, forms and so on.</p>
<p>The Development Tracking Sheet assists in the re-use of the already developed module by merely  customizing the module to meet the requirement. The Development Tracking Sheet also acts as documentation of the code development cycle.</p>
<p>2.In Order to follow better coding standards, steps must be taken to imbibe knowledge of <em>Object Oriented Programming</em> (OOPS).</p>
<p>3.The use of <em>Frameworks</em> such as CakePHP is soon going to be made mandatory in order to maintain a uniform and good coding standard and to render rapid development speed.</p>
<p>4.If frameworks are not being used, a <em>standard directory structure</em> must be followed to make modifications and reworking of codes easier.</p>
<p>5.<em>Commenting of coded lines</em> is necessary to improve readability of the code.</p>
<p>6.<em>Sufficient documentation</em> of re-usable code is necessary to make it easier for other developers to re-use the code.</p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=200</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How They Hack Your Website: Overview of Common Techniques</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=195</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=195#comments</comments>
		<pubDate>Mon, 25 Oct 2010 07:05:34 +0000</pubDate>
		<dc:creator>akshay</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=195</guid>
		<description><![CDATA[http://www.cmswire.com/cms/web-cms/how-they-hack-your-website-overview-of-common-techniques-002339.php A detail overview of common hacking techniques.]]></description>
			<content:encoded><![CDATA[<p>http://www.cmswire.com/cms/web-cms/how-they-hack-your-website-overview-of-common-techniques-002339.php</p>
<p>A detail overview of common hacking techniques.</p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=195</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common Security Issues with Coding</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=192</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=192#comments</comments>
		<pubDate>Tue, 19 Oct 2010 04:08:03 +0000</pubDate>
		<dc:creator>vivek</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=192</guid>
		<description><![CDATA[http://www.smashingmagazine.com/2010/10/18/common-security-mistakes-in-web-applications/]]></description>
			<content:encoded><![CDATA[<p>http://www.smashingmagazine.com/2010/10/18/common-security-mistakes-in-web-applications/</p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=192</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add commas to a number</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=188</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=188#comments</comments>
		<pubDate>Tue, 12 Oct 2010 09:46:56 +0000</pubDate>
		<dc:creator>vivek</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=188</guid>
		<description><![CDATA[This functionality is not built into JavaScript, so custom code needs to be used. The following is one way of adding commas to a number, and returning a string. function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = [...]]]></description>
			<content:encoded><![CDATA[<p>This functionality is not built into JavaScript, so custom code needs to be used. The following is one way of adding commas to a number, and returning a string.<br />
<code>function addCommas(nStr)<br />
{<br />
	nStr += '';<br />
	x = nStr.split('.');<br />
	x1 = x[0];<br />
	x2 = x.length > 1 ? '.' + x[1] : '';<br />
	var rgx = /(\d+)(\d{3})/;<br />
	while (rgx.test(x1)) {<br />
		x1 = x1.replace(rgx, '$1' + ',' + '$2');<br />
	}<br />
	return x1 + x2;<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=188</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete a folder using PHP</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=186</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=186#comments</comments>
		<pubDate>Tue, 12 Oct 2010 05:17:41 +0000</pubDate>
		<dc:creator>vivek</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=186</guid>
		<description><![CDATA[function delete_directory($dirname) { if (is_dir($dirname)) $dir_handle = opendir($dirname); if (!$dir_handle) return false; while($file = readdir($dir_handle)) { if ($file != "." &#038;&#038; $file != "..") { if (!is_dir($dirname."/".$file)) unlink($dirname."/".$file); else delete_directory($dirname.'/'.$file); } } closedir($dir_handle); rmdir($dirname); return true; }]]></description>
			<content:encoded><![CDATA[<p><code>function delete_directory($dirname) {<br />
   if (is_dir($dirname))<br />
      $dir_handle = opendir($dirname);<br />
   if (!$dir_handle)<br />
      return false;<br />
   while($file = readdir($dir_handle)) {<br />
      if ($file != "." &#038;&#038; $file != "..") {<br />
         if (!is_dir($dirname."/".$file))<br />
            unlink($dirname."/".$file);<br />
         else<br />
            delete_directory($dirname.'/'.$file);<br />
      }<br />
   }<br />
   closedir($dir_handle);<br />
   rmdir($dirname);<br />
   return true;<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=186</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>creating CDATA section</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=184</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=184#comments</comments>
		<pubDate>Thu, 07 Oct 2010 05:19:34 +0000</pubDate>
		<dc:creator>vivek</dc:creator>
				<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=184</guid>
		<description><![CDATA[http://stackoverflow.com/questions/2780506/stop-minidom-converting-to-lt-gt]]></description>
			<content:encoded><![CDATA[<p>http://stackoverflow.com/questions/2780506/stop-minidom-converting-to-lt-gt</p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=184</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending PHP mails on GoDaddy servers</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=181</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=181#comments</comments>
		<pubDate>Mon, 27 Sep 2010 07:58:23 +0000</pubDate>
		<dc:creator>vivek</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=181</guid>
		<description><![CDATA[http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_23172666.html function send_godaddy_mail($To, $to_name, $Subject, $Msg, $From, $from_name) { require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP //$mail->Mailer = "smtp"; $mail->Host = "relay-hosting.secureserver.net;smtpout.secureserver.net"; $mail->From = $From; $mail->FromName = $from_name; $mail->AddAddress($To, $to_name); $mail->Subject = $Subject; $mail->Body = $Msg; if(!$mail->Send()) { require($_SERVER['DOCUMENT_ROOT'] . "/header.php"); echo 'Message was not sent.'; echo 'Mailer error: [...]]]></description>
			<content:encoded><![CDATA[<p>http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_23172666.html</p>
<p><code>function send_godaddy_mail($To, $to_name, $Subject, $Msg, $From, $from_name)<br />
{<br />
require("class.phpmailer.php");<br />
$mail = new PHPMailer();</p>
<p>$mail->IsSMTP(); // telling the class to use SMTP<br />
//$mail->Mailer = "smtp";<br />
$mail->Host = "relay-hosting.secureserver.net;smtpout.secureserver.net";</p>
<p>$mail->From = $From;<br />
$mail->FromName =  $from_name;<br />
$mail->AddAddress($To, $to_name);</p>
<p>$mail->Subject = $Subject;<br />
$mail->Body = $Msg;</p>
<p>  if(!$mail->Send())<br />
  {<br />
    require($_SERVER['DOCUMENT_ROOT'] . "/header.php");<br />
    echo 'Message was not sent.';<br />
    echo 'Mailer error: ' . $mail->ErrorInfo;<br />
    require($_SERVER['DOCUMENT_ROOT'] . "/footer.php");<br />
  } else {<br />
    return "Message Sent";<br />
  }<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=181</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Normalization</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=174</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=174#comments</comments>
		<pubDate>Mon, 20 Sep 2010 05:31:51 +0000</pubDate>
		<dc:creator>akshay</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=174</guid>
		<description><![CDATA[Guidelines to the design relational databases without logic flaws. Applying these rules to your database structure is referred to as normalization. ]]></description>
			<content:encoded><![CDATA[<p style="text-align: left"><strong>Overview</strong></p>
<p>When structuring a database, putting the right columns in the right tables can be a daunting task. When you finally accomplish this task, you may find out that you have logic problems within your database, especially if you come from the old world of non-relational databases where everything was contained in the same file. Using the old idea of keeping all your data together in one table in a relational databases is a bad idea. It&#8217;s<br />
almost sacrilegious. A set of rules was established to help database designers. These guidelines lead to the design of truly relational databases without logic flaws. Applying these rules to your database structure is referred to as normalizing your data, normalization. Today, you will learn</p>
<p>1. What normalization is and the benefits it can provide<br />
2. The degrees of normalization</p>
<p>What Is Normalization?<br />
Normalization is a set of rules to help database designers develop a schema that minimizes logic problems.Each rule builds on the previous rule. Normalization was adapted because the old style of putting all the data in one place, such as a file or database table, was inefficient and led to logic errors when trying to manipulate the contained data. For example, look at the Meet_A_Geek database. If you stored all the data in the Customers table, the table would look like something like the following:</p>
<p><strong>Customers</strong><br />
Customer_ID<br />
Last_Name<br />
First_Name<br />
Address<br />
Product_Name1<br />
Product_Cost1<br />
Product_Picture1<br />
Product_Name2<br />
Product_Cost2<br />
Product_Picture2<br />
Order_Date<br />
Order_Quantity<br />
Shipper_Name</p>
<p>The table has been abbreviated, but it still portrays the general idea. Now, in your Customers table, how could you add a new customer? You would have to add a product and an order as well. What if you wanted to run a report that shows all the products you sell? You could not easily separate products from customers in a simple SQL statement. The beauty of a relational database, if designed correctly, is that you can do just that.Normalization also makes things easier to understand. Humans tend to break things down to the lowest<br />
common denominator. We do it with almost everything—from animals to cars. We look at a big picture and make it less complex by grouping similar things together. The guidelines that normalization provides create the framework to break down the structure. In your sample database, It is easy to see that you have three distinct groups: customers, products, and orders. Following normalization guidelines, you would create your tables based on these groups. The normalization process has a name and a set of rules for each phase of breakdown/grouping. This all may seem a little confusing at first, but I hope you will understand the process as well as the reasons for doing it this way. Most people are happy with a spreadsheet that holds all their pertinent data. The time it takes to break down your schema by going through the normalization process is well spent. It will require less time to go through the process than it would to cut and paste your columns of data so they<br />
fit the report the boss wants. Another advantage to normalizing your database is space consumption. A normalized database will take up less space overall than one that is not normalized. There is less repetition of data, so the actual disk space that is consumed holding your data will be much smaller.</p>
<p><strong>Degrees of Normalization</strong></p>
<p>There are basically three steps of normalization. They are First Normal Form (1NF), Second Normal Form (2NF) and Third Normal Form (3NF). Each form has its own set of rules. After a database conforms to a level, it is considered normalized to that form. Say, for example, that your database conforms to all the rules of the second level of normalization. It is then considered to be in Second Normal Form. Sometimes it is not always the best idea to have a database conform to the highest level of normalization. It may cause an<br />
unnecessary level of complexity that could be avoided if it were at a lower form of normalization.<br />
Note There are a total of nine different rules of normalization. They are First Normal<br />
Form, Second Normal Form, Third Normal Form, Boyce-Codd Normal Form, Fourth Normal Form, Fifth Normal Form or Join-Projection Normal Form, Strong Join-Projection Normal Form, Over-Strong Join-Projection Normal Form, and Domain Key Normal Form. This book will only cover the first three forms of normalization.</p>
<p><strong>I.First Normal Form</strong></p>
<p>The rule of First Normal Form states that all repeating columns should be eliminated and put into separate tables. This is a pretty easy rule to follow. Take a look at the schema for the Customers database in Table 5.1</p>
<p><strong>Customers</strong></p>
<p>Customer_ID<br />
Last_Name<br />
First_Name<br />
Address<br />
Product_Name1<br />
Product_Cost1<br />
Product_Picture1<br />
Product_Name2<br />
Product_Cost2<br />
Product_Picture2<br />
Order_Number<br />
Order_Date<br />
Order_Quantity<br />
Shipper_Name</p>
<p>In Table 5.1, you have several repeating columns. They mostly deal with products. So, according to the rule, you must eliminate the repeaters and give them their own table. That&#8217;s easy to do. The resulting database tables are shown in Table 5.2.</p>
<p>Table 5.2 Eliminating Data Repetition in a Database</p>
<p><strong>Customers </strong></p>
<p>Customer_ID<br />
Last_Name<br />
First_Name<br />
Address<br />
Order_Number<br />
Order_Date<br />
Order_Quantity<br />
Order_Shipper<br />
Shipper_Name</p>
<p><strong>Products</strong></p>
<p>Product_Name<br />
Product_Cost<br />
Product_Picture</p>
<p>Now there are two tables. There still is a problem. There is no way currently to relate the data from the original table to the data in the new table. To do that, a key must be added to the second table to establish the relationship. To do this, add a primary key to the Products table called Product_ID,<br />
and add a key to Customers table that relates the Products table to the Customers table. The Product_ID field is an ideal candidate. The resulting tables resemble Table 5.3:</p>
<p>Table 5.3 First Normal Form<br />
<strong><br />
Customers </strong></p>
<p>Customer_ID<br />
Product_ID<br />
Last_Name<br />
First_Name<br />
Address<br />
Order_Number<br />
Order_Date<br />
Order_Quantity<br />
Shipper_Name</p>
<p><strong>Products</strong></p>
<p>Product_ID<br />
Product_Name<br />
Product_Cost<br />
Product_Picture</p>
<p>Now, a one-to-many relationship has been established. This represents what the database will be doing in real life. The client will have many products to sell, regardless of how many customers there are to buy them. Also, a customer still needs to have ordered a product to be a customer. You are no longer  obligated to add a new customer every time you add a new product to your inventory. Bringing a database to First Normal Form solves the multiple column heading problem. Too often, inexperienced database designers will do something similar to the non-normalized table in today&#8217;s first example. They will create many columns representing the same data over and over again. In an electric company in the Northwest, there was a database that tracked nuclear power plant parts. The table in<br />
their database, which contained the part numbers, had a repeated column that numbered well into the 30s. Every time a new item was stored for this part, they created a new column to store the information. Obviously, this was a poorly designed database and a programmer&#8217;s/administrator&#8217;s nightmare.<br />
Normalization helps to clarify the database and break it down into smaller, more understandable pieces. Instead of having to understand a huge, monolithic table that has many different aspects, you only have<br />
to understand smaller, more tangible objects and the simple relationships they share with all the other smaller objects. Needless to say, a better understanding of how a database works leads to a better utilization of your assets.</p>
<p style="text-align: left"><strong>II.Second Normal Form</strong></p>
<p style="text-align: left">The rule of Second Normal Form states that all partial dependencies must be eliminated and separated into their own tables. A partial dependency is a term to describe data that doesn&#8217;t rely on the table key to uniquely identify it. In the sample database, the order information is in every record. It would be simpler to use just the order number. The rest of the information could reside in its own table. After breaking out the order information, your schema would resemble Table 5.4.</p>
<p>Table for Second Normal Form &#8211; Eliminating Partial Dependencies</p>
<p><strong>Customers </strong></p>
<p>Customer_ID<br />
Product_ID<br />
Order_Number<br />
Last_Name<br />
First_Name<br />
Address<br />
Shipper_Name</p>
<p><strong>Products</strong></p>
<p>Product_ID<br />
Order_Date<br />
Product_Name<br />
Product_Cost<br />
Product_Picture</p>
<p><strong>Orders</strong></p>
<p>Order_Number<br />
Order_Quantity</p>
<p>Again, by arranging the schema in this way, you have reflected the real world in your database. You would have to make some changes for your business rules to be applicable, but for illustrating normalization, this is okay.<br />
By now you should be noticing some things. The table that was once hard to read and understand is now making more sense. Relationships between the information that is going to be stored is clearer and easier to understand. Things appear to be more logical. These are some of the advantages to<br />
normalizing a database. One of the major disadvantages of normalization is the time it takes to do. Most people are busy enough, and to spend time making sure their data is normalized when it works just fine is perceived as a<br />
waste of time. This is not so. You will spend way more time fixing a broken, non-normalized database than you would a normalized, well-designed database. By achieving the Second Normal Form, you enjoy some of the advantages of a relational database. For example, you can now add new columns to the Customers table without affecting the Products or the<br />
Orders tables. The same applies to the other tables. Getting to this level of normalcy allows data to fall naturally into the bounds for which it was intended.<br />
After you have reached the level of Second Normal Form, most of the logic problems are taken care of. You can insert a record without excess data in most tables. Looking closer at the Customers table, there is a Shipper_Name column. This column is not dependant on the customer. The next level of<br />
normalization will explain how to clear this up.</p>
<p style="text-align: left"><strong>III.Third Normal Form</strong></p>
<p style="text-align: left">The rule of Third Normal Form is to eliminate and separate any data that is not a key. This column must depend on the key for its value. All values must be uniquely identified by the key. In the sample database, the Customers table contains the Shipper_Name column. The Shipper_Name is not uniquely identified by the key. You could separate this data from the current table and put it into its own table. Table 5.5 shows the resulting database schema:</p>
<p>Table 5.5  for Third Normal Form</p>
<p><strong>Customers </strong><br />
Customer_ID<br />
Product_ID<br />
Order_Number<br />
Shipper_ID<br />
Last_Name<br />
First_Name<br />
Address</p>
<p><strong>Products</strong></p>
<p>Product_ID<br />
Product_Name<br />
Product_Cost<br />
Product_Picture</p>
<p><strong>OrderMaster</strong></p>
<p>Order_Number<br />
Order_Date<br />
Order_Quantity</p>
<p><strong>OrderDetail</strong></p>
<p>Order_Detail_ID<br />
Order_Number<br />
Order_Date<br />
Order_Quantity</p>
<p><strong>Shipping</strong></p>
<p>Shipper_ID<br />
Shipper_Name</p>
<p>Now all your tables are in Third Normal Form. This provides the most flexibility and prevents any logic errors when inserting or deleting records. Each column in the table is uniquely identified by the key, and no data is repeated. This provides a clean, elegant schema that is easy to work with and easy to expand.</p>
<p style="text-align: left"><strong>How Far to Take Normalization</strong></p>
<p style="text-align: left">The next decision is how far to go with normalization. Normalization is a subjective science. It is up to you to determine what needs to be broken down. If your database is just going to provide data to a single user for a<br />
simple purpose and there is little to no chance of expansion, taking your data to 3NF might be a little extreme. The rules of normalization exist as guidelines to create easily manageable tables that are flexible and efficient.<br />
There are times when normalizing your data to the highest level doesn&#8217;t make sense. For example, suppose you added another address column to your database. It is quite normal to have two lines for an address. The table schema might look like the following:</p>
<p><strong>Customer_ID</strong><br />
Last_Name<br />
First_Name<br />
Address1<br />
Address2</p>
<p>According to the rules that would make this table compliant with First Normal Form, the address columns would be taken out and replaced with the key for the new table. The following is the resulting schema:</p>
<p><strong>Customer_ID </strong><br />
Last_Name<br />
First_Name</p>
<p><strong>Address_ID</strong><br />
Customer_ID<br />
Address</p>
<p>The database is now First Normal Form compliant. Your customers can have more than one address. The problem that exists is that you have overcomplicated a simple idea because you were trying to follow the rules of normalization. In the example, the second address is totally optional. It is there just to collect information that might be used for contact information. There is really no need to break it into its own table and force the rules of normalization on it. In this instance, taking it to a form of normalcy<br />
defeats the purpose for which the data is used. It adds another layer of complexity that is not needed. A good way to determine if your normalizing is getting carried away is to look at the number of tables you have. A large number of tables may indicate that you are normalizing too much. Take a step back and look at your schema. Are you breaking things down just to follow the rules, or is it a practical breakdown. These are the things that you, the database designer, need to decide. Experience and common sense will guide you to make the right decisions. Normalizing is not an exact science; It is a<br />
subjective one.<br />
There are six more levels of normalization that have not been discussed so far. They are Boyce-Codd Normal Form, Fourth Normal Form (4NF), Fifth Normal Form (5NF), Strong Join-Protection Normal Form, Over-Strong Join-Protection Normal Form, and Domain Key Normal Form. These forms of<br />
normalization may take things further than they need to go. They exist to make a database truly relational. They mostly deal with multiple  dependencies and relational keys. If you are familiar with this level of normalization, you probably don&#8217;t need this book.</p>
<p style="text-align: left"><strong>Summary</strong></p>
<p style="text-align: left">Normalization is a technique used to create good logical relationships between tables in a database. It helps prevent logical errors when manipulating data. Normalization also makes adding new columns easier without disrupting the current schema and relationships.<br />
There are several levels of normalization: First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF), Boyce-Codd Normal Form, Fourth Normal Form (4NF), Fifth Normal Form (5NF), Strong Join-Protection Normal Form, Over-Strong Join-Protection Normal Form, and Domain Key<br />
Normal Form. Each new level or form brings the database closer to being truly relational. The first three forms were discussed. They provided enough normalization to meet the needs of most databases. Going overboard with normalization can lead to an inefficient database and can make your schema too complex with which to work. A proper balance of common sense and practicality can help you decide when to normalize and when to let sleeping dogs lie.</p>
<p style="text-align: left"><strong>Q&amp;A</strong></p>
<p style="text-align: left">Q: When is the best time to normalize my database?<br />
A:<br />
Most of the time, normalization takes place after everything gets rolling and<br />
your database is ready to move into production. This is not the best time to<br />
do it. The best time to normalize is immediately after you have designed<br />
your table and have it all diagrammed. That is when you will see some<br />
problems and will be able to more readily recognize where normalization<br />
needs to occur.</p>
<p style="text-align: left">Q: Should I bring my database to 3NF?<br />
A:<br />
You should only if it makes sense to do so. As shown in today&#8217;s last<br />
example in the chapter, sometimes it makes sense not to normalize.<br />
Normalization breaks things down to their smallest form—small equates to<br />
speed. The faster a database performs, the better off you&#8217;ll be.</p>
<p style="text-align: left">
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=174</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Word Limit</title>
		<link>http://strappcenter.net/StrApp-Knowledge-Management/?p=171</link>
		<comments>http://strappcenter.net/StrApp-Knowledge-Management/?p=171#comments</comments>
		<pubDate>Fri, 17 Sep 2010 09:33:45 +0000</pubDate>
		<dc:creator>vivek</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://strappcenter.net/StrApp-Knowledge-Management/?p=171</guid>
		<description><![CDATA[function string_limit_words($string, $word_limit) { $words = explode(' ', $string); return implode(' ', array_slice($words, 0, $word_limit)); }]]></description>
			<content:encoded><![CDATA[<p><code>function string_limit_words($string, $word_limit) {<br />
     $words = explode(' ', $string);<br />
     return implode(' ', array_slice($words, 0, $word_limit));<br />
   }</code></p>
]]></content:encoded>
			<wfw:commentRss>http://strappcenter.net/StrApp-Knowledge-Management/?feed=rss2&amp;p=171</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

