<?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>These things are far too hard &#187; mysql</title>
	<atom:link href="http://leadingedgescripts.co.uk/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://leadingedgescripts.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 24 Feb 2011 13:05:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Database development &#8211; Some Rules</title>
		<link>http://leadingedgescripts.co.uk/web-development/database-development-some-rules/</link>
		<comments>http://leadingedgescripts.co.uk/web-development/database-development-some-rules/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 21:56:59 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.leadingedgescripts.co.uk/?p=173</guid>
		<description><![CDATA[If I&#8217;d known this stuff when I first started to design databases for web applications, I think it would have helped me a lot, these are not necessarily &#8216;formal recommendations&#8217; or even what some people might call &#8216;best practice&#8217;, but these rules work for me when I&#8217;m designing my web applications. It makes development quicker, [...]]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-4904188713812219";
/* 468x60, created 02/11/08 */
google_ad_slot = "9286450703";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>If I&#8217;d known this stuff when I first started to design databases for web applications, I think it would have helped me a lot, these are not necessarily &#8216;formal recommendations&#8217; or even what some people might call &#8216;best practice&#8217;, but these rules work for me when I&#8217;m designing my web applications. It makes development quicker, because I don&#8217;t have to think about the names of my columns and tables when I&#8217;m writing code.</p>
<p>So with that in mind, these are my &#8216;rules&#8217; for database design:</p>
<ol>
<li>Name everything in lowercase, that means table names, column names, everything!</li>
<li>always use the plural for table names</li>
<li>always use singular for columns names</li>
<li>always name primary key &#8216;index&#8217; fields &#8216;id&#8217; this prevents any issues with the name &#8216;index&#8217;</li>
<li>always name your database columns using something that accurately describes the content of the column e.g. email, first_name, last_name, tel</li>
</ol>
<p>Short and sweet, but these rules stand me in good stead these days.</p>
<p>On a similar topic, and equally useful, use a database administration tool, like <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">MySQLAdministrator</a> since it&#8217;s so much faster than installing old faithful <a href="http://www.phpmyadmin.net/home_page/index.php">PhpMyAdmin</a>. Don&#8217;t get me wrong PhpMyAdmin is still great, and I still use it a lot, but when I can get away with it MySQLAdministrator is just so much faster for creating databases tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://leadingedgescripts.co.uk/web-development/database-development-some-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

