<?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>PlanetMysql.ru - информация о СУБД MySQL &#187; CREATE TABLE</title>
	<atom:link href="http://planetmysql.ru/category/create-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Sat, 11 Feb 2012 12:38:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Dumping DDL – mysqldump tables, stored procedures, events, triggers (separately)</title>
		<link>http://mysqlpreacher.com/wordpress/2010/08/dumping-ddl-mysqldump-tables-stored-procedures-events-triggers-separately/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dumping-ddl-%25e2%2580%2593-mysqldump-tables-stored-procedures-events-triggers-separately</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/08/dumping-ddl-mysqldump-tables-stored-procedures-events-triggers-separately/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 14:11:28 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[CREATE TABLE]]></category>
		<category><![CDATA[ddl]]></category>
		<category><![CDATA[ddl compare]]></category>
		<category><![CDATA[ddl comparison]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[identify ddl changes]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<category><![CDATA[triggers]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=374</guid>
		<description><![CDATA[If you like to keep your ddl backed up in some source management tool like svn or cvs and want to do it individually for stored procedures, events, triggers, tables and such rather than having a single file you can easily do so using the below. You could even include the &#8211;skip-dump-date or &#8211;skip-comments and use the below to compare ddl daily checking for alterations thus making sure you are aware of any ddl changes done on the database.



user=backup_user
password=`cat ~/.backup_password`
hostname=127.0.0.1
port=3306
dbname=test_db
path=/home/mysql/ddl
date=`date +%Y%m%d`

mysqldump -u$user -p$password -h$hostname -P$port --no-create-info --no-data --no-create-db --skip-opt $dbname &#62; "$path"/"$dbname"_triggers_"$date".sql
mysqldump -u$user -p$password -h$hostname -P$port --routines --skip-triggers --no-create-info --no-data --no-create-db --skip-opt $dbname &#62; "$path"/"$dbname"_routines_"$date".sql
mysqldump -u$user -p$password -h$hostname -P$port --events --skip-triggers --no-create-info --no-data --no-create-db --skip-opt $dbname &#62; "$path"/"$dbname"_events_"$date".sql
mysqldump -u$user -p$password -h$hostname -P$port --skip-triggers --no-data --no-create-db --skip-opt $dbname &#62; "$path"/"$dbname"_tables_"$date".sql
]]></description>
			<content:encoded><![CDATA[<p>If you like to keep your ddl backed up in some source management tool like svn or cvs and want to do it individually for stored procedures, events, triggers, tables and such rather than having a single file you can easily do so using the below. You could even include the &#8211;skip-dump-date or &#8211;skip-comments and use the below to compare ddl daily checking for alterations thus making sure you are aware of any ddl changes done on the database.</p>



<blockquote>user=backup_user<br>
password=`cat ~/.backup_password`<br>
hostname=127.0.0.1<br>
port=3306<br>
dbname=test_db<br>
path=/home/mysql/ddl<br>
date=`date +%Y%m%d`<br>
<br>
mysqldump -u$user -p$password -h$hostname -P$port --no-create-info --no-data --no-create-db --skip-opt $dbname &gt; "$path"/"$dbname"_triggers_"$date".sql<br>
mysqldump -u$user -p$password -h$hostname -P$port --routines --skip-triggers --no-create-info --no-data --no-create-db --skip-opt $dbname &gt; "$path"/"$dbname"_routines_"$date".sql<br>
mysqldump -u$user -p$password -h$hostname -P$port --events --skip-triggers --no-create-info --no-data --no-create-db --skip-opt $dbname &gt; "$path"/"$dbname"_events_"$date".sql<br>
mysqldump -u$user -p$password -h$hostname -P$port --skip-triggers --no-data --no-create-db --skip-opt $dbname &gt; "$path"/"$dbname"_tables_"$date".sql<br>
</blockquote><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25495&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25495&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/08/06/dumping-ddl-%e2%80%93-mysqldump-tables-stored-procedures-events-triggers-separately/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL’s SQL Deviations and Extensions</title>
		<link>http://www.pythian.com/news/13845/mysqls-sql-deviations-and-extensions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql%25e2%2580%2599s-sql-deviations-and-extensions</link>
		<comments>http://www.pythian.com/news/13845/mysqls-sql-deviations-and-extensions/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:53:22 +0000</pubDate>
		<dc:creator>Sheeri K. Cabral</dc:creator>
				<category><![CDATA[CREATE TABLE]]></category>
		<category><![CDATA[explain]]></category>
		<category><![CDATA[Kaleidoscope]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[odtug]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[Pythian Appearances]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL standard]]></category>
		<category><![CDATA[sql_mode]]></category>
		<category><![CDATA[Technical Blog]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=13845</guid>
		<description><![CDATA[Today at Kaleidoscope I will be doing a 90-minute session comparing MySQL&#8217;s SQL syntax to the ANSI/ISO SQL:2003 standard, entitled What Do You Mean, &#8220;SQL Syntax Error&#8221;?
You can download the PDF slides now.

For those that may be following along the presentation later today (4 pm Eastern time), here are some links that I may throw out during the session:
SQL 2003 standard &#8211; actually it is &#8220;Information taken from the Final Committee Draft (FCD) of ISO/IEC 9075-2:2003&#8243; but it&#8217;s extremely close to the actual standard.  The actual standard is a document that costs a non-trivial amount of money to get, and cannot be republished.
The MySQL Administrator&#8217;s Bible, from which this content was taken from.
The MySQL Manual page for sql_mode values.
Information about and examples of quoting in MySQL
The MySQL Manual page for CREATE TABLE which contains all the special extensions MySQL has for tables.
The MySQL Manual page for PROCEDURE ANALYSE().
The MySQL Manual page for the SHOW extension
PDF slides for an EXPLAIN presentation I have done, and the EXPLAIN Cheatsheet.
]]></description>
			<content:encoded><![CDATA[<p>Today at <a href="http://www.odtugkaleidoscope.com">Kaleidoscope</a> I will be doing a 90-minute session comparing MySQL&#8217;s SQL syntax to the ANSI/ISO SQL:2003 standard, entitled <em>What Do You Mean, &#8220;SQL Syntax Error&#8221;</em>?</p>
<p>You can <a href="http://technocation.org/files/doc/2010_06_MySQL_Syntax.pdf">download the PDF slides</a> now.<br />
<span></span><br />
For those that may be following along the presentation later today (4 pm Eastern time), here are some links that I may throw out during the session:</p>
<p><UL><LI><a href="http://savage.net.au/SQL/sql-2003-2.bnf.html">SQL 2003 standard</a> &#8211; actually it is &#8220;Information taken from the Final Committee Draft (FCD) of ISO/IEC 9075-2:2003&#8243; but it&#8217;s extremely close to the actual standard.  The actual standard is a document that costs a non-trivial amount of money to get, and cannot be republished.<br />
</LI><LI><a href="http://tinyurl.com/mysqlbible">The MySQL Administrator&#8217;s Bible</a>, from which this content was taken from.<br />
</LI><LI>The MySQL Manual page for <a href="http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html">sql_mode values</a>.<br />
</LI><LI>Information about and examples of <a href="http://bit.ly/mysqlquoting">quoting in MySQL</a><br />
</LI><LI>The MySQL Manual page for <a href="http://dev.mysql.com/doc/refman/5.1/en/create-table.html">CREATE TABLE</a> which contains all the special extensions MySQL has for tables.<br />
</LI><LI>The MySQL Manual page for <a href="http://dev.mysql.com/doc/refman/5.1/en/procedure-analyse.html">PROCEDURE ANALYSE()</a>.<br />
</LI><LI>The MySQL Manual page for <a href="http://dev.mysql.com/doc/refman/5.1/en/show.html">the SHOW extension</a><br />
</LI><LI><a href="http://technocation.org/files/doc/EXPLAIN.pdf">PDF slides</a> for an EXPLAIN presentation I have done, and the <a href="http://www.pythian.com/blogs/wp-content/uploads/explain-diagram.pdf">EXPLAIN Cheatsheet</a>.<br />
</LI></UL></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25135&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25135&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/06/28/mysql%e2%80%99s-sql-deviations-and-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New CREATE TABLE performance record!</title>
		<link>http://www.flamingspork.com/blog/2010/06/03/new-create-table-performance-record/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-create-table-performance-record</link>
		<comments>http://www.flamingspork.com/blog/2010/06/03/new-create-table-performance-record/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 07:40:10 +0000</pubDate>
		<dc:creator>Stewart Smith</dc:creator>
				<category><![CDATA[boost]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[CREATE TABLE]]></category>
		<category><![CDATA[Drizzle]]></category>
		<category><![CDATA[enum]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.flamingspork.com/blog/?p=2036</guid>
		<description><![CDATA[﻿﻿4 min 20 sec
So next time somebody complains about NDB taking a long time in CREATE TABLE, you&#8217;re welcome to point them to this :)

A single CREATE TABLE statement
It had ONE column
It was an ENUM column.
With 70,000 possible values.
It was 605kb of SQL.
It ran on Drizzle

This was to test if you could create an ENUM column with greater than 216 possible values (you&#8217;re not supposed to be able to) &#8211; bug 589031 has been filed.
How does it compare to MySQL? Well&#8230; there are other problems (Bug 54194 &#8211; ENUM limit of 65535 elements isn&#8217;t true filed). Since we don&#8217;t have any limitations in Drizzle due to the FRM file format, we actually get to execute the CREATE TABLE statement.
Still, why did this take four and a half minutes? I luckily managed to run poor man&#8217;s profiler during query execution. I very easily found out that I had this thread constantly running check_duplicates_in_interval(), which does a stupid linear search for duplicates. It turns out, that for 70,000 items, this takes approximately four minutes and 19.5 seconds. Bug 589055 CREATE TABLE with ENUM fields with large elements takes forever (where forever is defined as a bit over four minutes) filed.
So I replaced check_duplicates_in_interval() with a implementation using a hash table (boost::unordered_set actually) as I wasn&#8217;t quite immediately in the mood for ripping out all of TYPELIB from the server. I can now run the CREATE TABLE statement in less than half a second.
So now, I can run my test case in much less time and indeed check for correct behaviour rather quickly.
I do have an urge to find out how big I can get a valid table definition file to though&#8230;. should be over 32MB&#8230;




		
			Share this on Facebook
		
		
			Tweet This!
		
		
			Share this on del.icio.us
		
		
			Digg this!
		
		
			Post on Google Buzz
		


]]></description>
			<content:encoded><![CDATA[<p>﻿﻿4 min 20 sec</p>
<p>So next time somebody complains about NDB taking a long time in CREATE TABLE, you&#8217;re welcome to point them to this :)</p>
<ul>
<li>A single CREATE TABLE statement</li>
<li>It had ONE column</li>
<li>It was an ENUM column.</li>
<li>With 70,000 possible values.</li>
<li>It was 605kb of SQL.</li>
<li>It ran on <a href="http://drizzle.org">Drizzle</a></li>
</ul>
<p>This was to test if you could create an ENUM column with greater than 2<sup>16</sup> possible values (you&#8217;re not supposed to be able to) &#8211; <a href="https://bugs.launchpad.net/drizzle/+bug/589031">bug 589031 has been filed</a>.</p>
<p>How does it compare to MySQL? Well&#8230; there are other problems (<a href="http://bugs.mysql.com/bug.php?id=54194">Bug 54194 &#8211; ENUM limit of 65535 elements isn&#8217;t true</a> filed). Since we don&#8217;t have any limitations in Drizzle due to the FRM file format, we actually get to execute the CREATE TABLE statement.</p>
<p>Still, why did this take <strong>four and a half minutes</strong>? I luckily managed to run <a href="http://poormansprofiler.org/">poor man&#8217;s profiler</a> during query execution. I very easily found out that I had this thread constantly running check_duplicates_in_interval(), which does a stupid linear search for duplicates. It turns out, that for 70,000 items, this takes approximately four minutes and 19.5 seconds. <a href="https://bugs.launchpad.net/drizzle/+bug/589055">Bug 589055 CREATE TABLE with ENUM fields with large elements takes forever</a> (where forever is defined as a bit over four minutes) filed.</p>
<p>So I replaced check_duplicates_in_interval() with a implementation using a hash table (boost::unordered_set actually) as I wasn&#8217;t quite immediately in the mood for ripping out all of TYPELIB from the server. I can now run the CREATE TABLE statement in less than half a second.</p>
<p>So now, I can run my test case in much less time and indeed check for correct behaviour rather quickly.</p>
<p>I do have an urge to find out how big I can get a valid table definition file to though&#8230;. should be over 32MB&#8230;</p>


<div>
<ul>
		<li>
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.flamingspork.com/blog/2010/06/03/new-create-table-performance-record/&amp;t=New+CREATE+TABLE+performance+record!" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li>
			<a href="http://twitter.com/home?status=New+CREATE+TABLE+performance+record!+-+File:%20/data/app/webapp/functions.php%3Cbr%20/%3ELine:%207%3Cbr%20/%3EMessage:%20Too%20many%20connections&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li>
			<a href="http://delicious.com/post?url=http://www.flamingspork.com/blog/2010/06/03/new-create-table-performance-record/&amp;title=New+CREATE+TABLE+performance+record!" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li>
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.flamingspork.com/blog/2010/06/03/new-create-table-performance-record/&amp;title=New+CREATE+TABLE+performance+record!" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li>
			<a href="http://www.google.com/buzz/post?url=http://www.flamingspork.com/blog/2010/06/03/new-create-table-performance-record/&amp;imageurl=" rel="nofollow" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
</ul>
<div></div>
</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24937&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24937&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/06/03/new-create-table-performance-record/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I create a simple MySQL database</title>
		<link>http://ronaldbradford.com/blog/how-do-i-create-a-simple-mysql-database-2009-09-17/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-do-i-create-a-simple-mysql-database</link>
		<comments>http://ronaldbradford.com/blog/how-do-i-create-a-simple-mysql-database-2009-09-17/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 20:49:31 +0000</pubDate>
		<dc:creator>Ronald Bradford</dc:creator>
				<category><![CDATA[CREATE TABLE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[Storage Engines]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=2010</guid>
		<description><![CDATA[I was asked this question recently &#8220;I am wanting to create a simple MySQL database consisting of 5 tables&#8221;?
While it&#8217;s easy to tell people to RTFM, the question does warrant an answer for the MySQL beginner to provide a more specific guidance as to where to start, and what to do. As a expert in MySQL it&#8217;s easy to forget how you would describe what to do.  Here are my tips to getting started. 
Step 1.  Download the MySQL 5.1 software for your platform (e.g. Linux, Windows, Mac etc) from MySQL 5.1 Downloads.  There are many different versions of MySQL, MySQL 5.1 is the current production version.
Step 2. You will need to install the MySQL software. The MySQL reference manual is the place to go, Chapter 2 describes installing MySQL.  You can also download a copy of the manual in various different formats at MySQL Documentation. This is also valuable for the time when the documentation may be be unavailable online.
Step 3.  Download a GUI tool to help you in the design of your first MySQL Tables. There are a number of products available to do this, the MySQL Query Browser  and  WebYog  are just two examples.  If your bold, you can use the mysql client command line tool and use the CREATE TABLE command to create your table structures.
MySQL by itself is ineffective for producing a client facing end result unless you have an application purpose and therefore a general application to access the data in MySQL.  Using a LAMP/WAMP stack is a good place to start. XAMPP  is a good cross platform program that gives you MySQL and a PHP technology stack.  You also get PhpMyAdmin included with XAMPP  which is a good web based design tool. I don&#8217;t mention earlier because it needs a running php/apache/mysql environment.  If you elect to start with this stack, then you don&#8217;t need to install any GUI tools.
Finally, there a wealth of knowledge, not at least the MySQL Forums and the #mysql channel on irc.freenode.net which can be good places to get free beginner information.]]></description>
			<content:encoded><![CDATA[<p>I was asked this question recently &#8220;I am wanting to create a simple MySQL database consisting of 5 tables&#8221;?</p>
<p>While it&#8217;s easy to tell people to RTFM, the question does warrant an answer for the MySQL beginner to provide a more specific guidance as to where to start, and what to do. As a expert in MySQL it&#8217;s easy to forget how you would describe what to do.  Here are my tips to getting started. </p>
<p>Step 1.  Download the MySQL 5.1 software for your platform (e.g. Linux, Windows, Mac etc) from <a href="http://dev.mysql.com/downloads/mysql/5.1.html">MySQL 5.1 Downloads</a>.  There are many different versions of MySQL, MySQL 5.1 is the current production version.</p>
<p>Step 2. You will need to install the MySQL software. The <a href="http://dev.mysql.com/doc/refman/5.1/en/">MySQL reference manual</a> is the place to go, Chapter 2 describes installing MySQL.  You can also download a copy of the manual in various different formats at <a href="http://dev.mysql.com/doc/">MySQL Documentation</a>. This is also valuable for the time when the documentation may be be unavailable online.</p>
<p>Step 3.  Download a GUI tool to help you in the design of your first MySQL Tables. There are a number of products available to do this, the <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">MySQL Query Browser</a>  and  <a href="http://www.webyog.com">WebYog</a>  are just two examples.  If your bold, you can use the mysql client command line tool and use the <a href="http://dev.mysql.com/doc/refman/5.1/en/create-table.html%20">CREATE TABLE</a> command to create your table structures.</p>
<p>MySQL by itself is ineffective for producing a client facing end result unless you have an application purpose and therefore a general application to access the data in MySQL.  Using a LAMP/WAMP stack is a good place to start. <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>  is a good cross platform program that gives you MySQL and a PHP technology stack.  You also get <a href="http://www.phpmyadmin.net">PhpMyAdmin</a> included with XAMPP  which is a good web based design tool. I don&#8217;t mention earlier because it needs a running php/apache/mysql environment.  If you elect to start with this stack, then you don&#8217;t need to install any GUI tools.</p>
<p>Finally, there a wealth of knowledge, not at least the <a href="http://forums.mysql.com/">MySQL Forums</a> and the <b>#mysql</b> channel on irc.freenode.net which can be good places to get free beginner information.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21214&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21214&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/18/how-do-i-create-a-simple-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I create a simple MySQL database</title>
		<link>http://ronaldbradford.com/blog/how-do-i-create-a-simple-mysql-database-2009-09-17/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-do-i-create-a-simple-mysql-database</link>
		<comments>http://ronaldbradford.com/blog/how-do-i-create-a-simple-mysql-database-2009-09-17/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 20:49:31 +0000</pubDate>
		<dc:creator>Ronald Bradford</dc:creator>
				<category><![CDATA[CREATE TABLE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[Storage Engines]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[webyog]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=2010</guid>
		<description><![CDATA[I was asked this question recently &#8220;I am wanting to create a simple MySQL database consisting of 5 tables&#8221;?
While it&#8217;s easy to tell people to RTFM, the question does warrant an answer for the MySQL beginner to provide a more specific guidance as to where to start, and what to do. As a expert in MySQL it&#8217;s easy to forget how you would describe what to do.  Here are my tips to getting started. 
Step 1.  Download the MySQL 5.1 software for your platform (e.g. Linux, Windows, Mac etc) from MySQL 5.1 Downloads.  There are many different versions of MySQL, MySQL 5.1 is the current production version.
Step 2. You will need to install the MySQL software. The MySQL reference manual is the place to go, Chapter 2 describes installing MySQL.  You can also download a copy of the manual in various different formats at MySQL Documentation. This is also valuable for the time when the documentation may be be unavailable online.
Step 3.  Download a GUI tool to help you in the design of your first MySQL Tables. There are a number of products available to do this, the MySQL Query Browser  and  WebYog  are just two examples.  If your bold, you can use the mysql client command line tool and use the CREATE TABLE command to create your table structures.
MySQL by itself is ineffective for producing a client facing end result unless you have an application purpose and therefore a general application to access the data in MySQL.  Using a LAMP/WAMP stack is a good place to start. XAMPP  is a good cross platform program that gives you MySQL and a PHP technology stack.  You also get PhpMyAdmin included with XAMPP  which is a good web based design tool. I don&#8217;t mention earlier because it needs a running php/apache/mysql environment.  If you elect to start with this stack, then you don&#8217;t need to install any GUI tools.
Finally, there a wealth of knowledge, not at least the MySQL Forums and the #mysql channel on irc.freenode.net which can be good places to get free beginner information.]]></description>
			<content:encoded><![CDATA[<p>I was asked this question recently &#8220;I am wanting to create a simple MySQL database consisting of 5 tables&#8221;?</p>
<p>While it&#8217;s easy to tell people to RTFM, the question does warrant an answer for the MySQL beginner to provide a more specific guidance as to where to start, and what to do. As a expert in MySQL it&#8217;s easy to forget how you would describe what to do.  Here are my tips to getting started. </p>
<p>Step 1.  Download the MySQL 5.1 software for your platform (e.g. Linux, Windows, Mac etc) from <a href="http://dev.mysql.com/downloads/mysql/5.1.html">MySQL 5.1 Downloads</a>.  There are many different versions of MySQL, MySQL 5.1 is the current production version.</p>
<p>Step 2. You will need to install the MySQL software. The <a href="http://dev.mysql.com/doc/refman/5.1/en/">MySQL reference manual</a> is the place to go, Chapter 2 describes installing MySQL.  You can also download a copy of the manual in various different formats at <a href="http://dev.mysql.com/doc/">MySQL Documentation</a>. This is also valuable for the time when the documentation may be be unavailable online.</p>
<p>Step 3.  Download a GUI tool to help you in the design of your first MySQL Tables. There are a number of products available to do this, the <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">MySQL Query Browser</a>  and  <a href="http://www.webyog.com">WebYog</a>  are just two examples.  If your bold, you can use the mysql client command line tool and use the <a href="http://dev.mysql.com/doc/refman/5.1/en/create-table.html%20">CREATE TABLE</a> command to create your table structures.</p>
<p>MySQL by itself is ineffective for producing a client facing end result unless you have an application purpose and therefore a general application to access the data in MySQL.  Using a LAMP/WAMP stack is a good place to start. <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>  is a good cross platform program that gives you MySQL and a PHP technology stack.  You also get <a href="http://www.phpmyadmin.net">PhpMyAdmin</a> included with XAMPP  which is a good web based design tool. I don&#8217;t mention earlier because it needs a running php/apache/mysql environment.  If you elect to start with this stack, then you don&#8217;t need to install any GUI tools.</p>
<p>Finally, there a wealth of knowledge, not at least the <a href="http://forums.mysql.com/">MySQL Forums</a> and the <b>#mysql</b> channel on irc.freenode.net which can be good places to get free beginner information.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21214&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21214&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/18/how-do-i-create-a-simple-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I find the storage engine of a MySQL table</title>
		<link>http://ronaldbradford.com/blog/find-storage-engine-of-mysql-table-2009-09-17/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-do-i-find-the-storage-engine-of-a-mysql-table</link>
		<comments>http://ronaldbradford.com/blog/find-storage-engine-of-mysql-table-2009-09-17/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 20:14:22 +0000</pubDate>
		<dc:creator>Ronald Bradford</dc:creator>
				<category><![CDATA[CREATE TABLE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[information_schema]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[storage engine]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=2014</guid>
		<description><![CDATA[This seems quite a trivial question, but developers don&#8217;t often know what a MySQL storage engine is and how to determine what storage engine is used for a table.
The first choice is to describe the table with the DESC[RIBE] command.  Side Note: people often don&#8217;t realize that DESC is a short acceptable version here.

mysql&#62; desc stats;
+---------+---------------------+------+-----+-------------------+----------------+
&#124; Field   &#124; Type                &#124; Null &#124; Key &#124; Default           &#124; Extra          &#124;
+---------+---------------------+------+-----+-------------------+----------------+
&#124; stat_id &#124; int(10) unsigned    &#124; NO   &#124; PRI &#124; NULL              &#124; auto_increment &#124;
&#124; created &#124; timestamp           &#124; NO   &#124;     &#124; CURRENT_TIMESTAMP &#124;                &#124;
&#124; version &#124; tinyint(3) unsigned &#124; NO   &#124;     &#124; NULL              &#124;                &#124;
&#124; referer &#124; varchar(500)        &#124; NO   &#124;     &#124; NULL              &#124;                &#124;
&#124; q       &#124; varchar(100)        &#124; YES  &#124;     &#124; NULL              &#124;                &#124;
&#124; uri     &#124; varchar(100)        &#124; YES  &#124;     &#124; NULL              &#124;                &#124;
&#124; server  &#124; text                &#124; NO   &#124;     &#124; NULL              &#124;                &#124;
&#124; headers &#124; text                &#124; YES  &#124;     &#124; NULL              &#124;                &#124;
+---------+---------------------+------+-----+-------------------+----------------+

Alias, this command does not provide the details of the storage engine.
You need to use the SHOW CREATE TABLE as a means to get a more detailed description including the storage engine.

mysql&#62; SHOW CREATE TABLE stats\G
*************************** 1. row ***************************
       Table: stats
Create Table: CREATE TABLE `stats` (
  `stat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `version` tinyint(3) unsigned NOT NULL,
  `referer` varchar(500) NOT NULL,
  `q` varchar(100) DEFAULT NULL,
  `uri` varchar(100) DEFAULT NULL,
  `server` text NOT NULL,
  `headers` text,
  PRIMARY KEY (`stat_id`)
) ENGINE=MyISAM AUTO_INCREMENT=21964 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

As another side note tip, try the \G instead of a semicolon (;) which provides a better vertical output.
Another option is to query the INFORMATION_SCHEMA.TABLES meta data.

mysql&#62; SELECT table_name,engine FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=DATABASE();
+--------------+--------+
&#124; table_name   &#124; engine &#124;
+--------------+--------+
&#124; stats        &#124; MyISAM &#124;
+--------------+--------+
1 row in set (0.00 sec)
]]></description>
			<content:encoded><![CDATA[<p>This seems quite a trivial question, but developers don&#8217;t often know what a MySQL storage engine is and how to determine what storage engine is used for a table.</p>
<p>The first choice is to describe the table with the <a href="http://dev.mysql.com/doc/refman/5.1/en/describe.html">DESC[RIBE]</a> command.  Side Note: people often don&#8217;t realize that DESC is a short acceptable version here.</p>
<pre>
mysql> desc stats;
+---------+---------------------+------+-----+-------------------+----------------+
| Field   | Type                | Null | Key | Default           | Extra          |
+---------+---------------------+------+-----+-------------------+----------------+
| stat_id | int(10) unsigned    | NO   | PRI | NULL              | auto_increment |
| created | timestamp           | NO   |     | CURRENT_TIMESTAMP |                |
| version | tinyint(3) unsigned | NO   |     | NULL              |                |
| referer | varchar(500)        | NO   |     | NULL              |                |
| q       | varchar(100)        | YES  |     | NULL              |                |
| uri     | varchar(100)        | YES  |     | NULL              |                |
| server  | text                | NO   |     | NULL              |                |
| headers | text                | YES  |     | NULL              |                |
+---------+---------------------+------+-----+-------------------+----------------+
</pre>
<p>Alias, this command does not provide the details of the storage engine.<br />
You need to use the <a href="http://dev.mysql.com/doc/refman/5.1/en/show-create-table.html">SHOW CREATE TABLE</a> as a means to get a more detailed description including the storage engine.</p>
<pre>
mysql> SHOW CREATE TABLE stats\G
*************************** 1. row ***************************
       Table: stats
Create Table: CREATE TABLE `stats` (
  `stat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `version` tinyint(3) unsigned NOT NULL,
  `referer` varchar(500) NOT NULL,
  `q` varchar(100) DEFAULT NULL,
  `uri` varchar(100) DEFAULT NULL,
  `server` text NOT NULL,
  `headers` text,
  PRIMARY KEY (`stat_id`)
) <b><u>ENGINE=MyISAM</u></b> AUTO_INCREMENT=21964 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
</pre>
<p>As another side note tip, try the \G instead of a semicolon (;) which provides a better vertical output.</p>
<p>Another option is to query the <a href="http://dev.mysql.com/doc/refman/5.1/en/tables-table.html">INFORMATION_SCHEMA.TABLES</a> meta data.</p>
<pre>
mysql> SELECT table_name,engine FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=DATABASE();
+--------------+--------+
| table_name   | engine |
+--------------+--------+
| stats        | MyISAM |
+--------------+--------+
1 row in set (0.00 sec)
</pre><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21215&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21215&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/18/how-do-i-find-the-storage-engine-of-a-mysql-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I find the storage engine of a MySQL table</title>
		<link>http://ronaldbradford.com/blog/find-storage-engine-of-mysql-table-2009-09-17/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-do-i-find-the-storage-engine-of-a-mysql-table-2</link>
		<comments>http://ronaldbradford.com/blog/find-storage-engine-of-mysql-table-2009-09-17/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 20:14:22 +0000</pubDate>
		<dc:creator>Ronald Bradford</dc:creator>
				<category><![CDATA[CREATE TABLE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[information_schema]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[storage engine]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=2014</guid>
		<description><![CDATA[This seems quite a trivial question, but developers don&#8217;t often know what a MySQL storage engine is and how to determine what storage engine is used for a table.
The first choice is to describe the table with the DESC[RIBE] command.  Side Note: people often don&#8217;t realize that DESC is a short acceptable version here.

mysql&#62; desc stats;
+---------+---------------------+------+-----+-------------------+----------------+
&#124; Field   &#124; Type                &#124; Null &#124; Key &#124; Default           &#124; Extra          &#124;
+---------+---------------------+------+-----+-------------------+----------------+
&#124; stat_id &#124; int(10) unsigned    &#124; NO   &#124; PRI &#124; NULL              &#124; auto_increment &#124;
&#124; created &#124; timestamp           &#124; NO   &#124;     &#124; CURRENT_TIMESTAMP &#124;                &#124;
&#124; version &#124; tinyint(3) unsigned &#124; NO   &#124;     &#124; NULL              &#124;                &#124;
&#124; referer &#124; varchar(500)        &#124; NO   &#124;     &#124; NULL              &#124;                &#124;
&#124; q       &#124; varchar(100)        &#124; YES  &#124;     &#124; NULL              &#124;                &#124;
&#124; uri     &#124; varchar(100)        &#124; YES  &#124;     &#124; NULL              &#124;                &#124;
&#124; server  &#124; text                &#124; NO   &#124;     &#124; NULL              &#124;                &#124;
&#124; headers &#124; text                &#124; YES  &#124;     &#124; NULL              &#124;                &#124;
+---------+---------------------+------+-----+-------------------+----------------+

Alias, this command does not provide the details of the storage engine.
You need to use the SHOW CREATE TABLE as a means to get a more detailed description including the storage engine.

mysql&#62; SHOW CREATE TABLE stats\G
*************************** 1. row ***************************
       Table: stats
Create Table: CREATE TABLE `stats` (
  `stat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `version` tinyint(3) unsigned NOT NULL,
  `referer` varchar(500) NOT NULL,
  `q` varchar(100) DEFAULT NULL,
  `uri` varchar(100) DEFAULT NULL,
  `server` text NOT NULL,
  `headers` text,
  PRIMARY KEY (`stat_id`)
) ENGINE=MyISAM AUTO_INCREMENT=21964 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

As another side note tip, try the \G instead of a semicolon (;) which provides a better vertical output.
Another option is to query the INFORMATION_SCHEMA.TABLES meta data.

mysql&#62; SELECT table_name,engine FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=DATABASE();
+--------------+--------+
&#124; table_name   &#124; engine &#124;
+--------------+--------+
&#124; stats        &#124; MyISAM &#124;
+--------------+--------+
1 row in set (0.00 sec)
]]></description>
			<content:encoded><![CDATA[<p>This seems quite a trivial question, but developers don&#8217;t often know what a MySQL storage engine is and how to determine what storage engine is used for a table.</p>
<p>The first choice is to describe the table with the <a href="http://dev.mysql.com/doc/refman/5.1/en/describe.html">DESC[RIBE]</a> command.  Side Note: people often don&#8217;t realize that DESC is a short acceptable version here.</p>
<pre>
mysql> desc stats;
+---------+---------------------+------+-----+-------------------+----------------+
| Field   | Type                | Null | Key | Default           | Extra          |
+---------+---------------------+------+-----+-------------------+----------------+
| stat_id | int(10) unsigned    | NO   | PRI | NULL              | auto_increment |
| created | timestamp           | NO   |     | CURRENT_TIMESTAMP |                |
| version | tinyint(3) unsigned | NO   |     | NULL              |                |
| referer | varchar(500)        | NO   |     | NULL              |                |
| q       | varchar(100)        | YES  |     | NULL              |                |
| uri     | varchar(100)        | YES  |     | NULL              |                |
| server  | text                | NO   |     | NULL              |                |
| headers | text                | YES  |     | NULL              |                |
+---------+---------------------+------+-----+-------------------+----------------+
</pre>
<p>Alias, this command does not provide the details of the storage engine.<br />
You need to use the <a href="http://dev.mysql.com/doc/refman/5.1/en/show-create-table.html">SHOW CREATE TABLE</a> as a means to get a more detailed description including the storage engine.</p>
<pre>
mysql> SHOW CREATE TABLE stats\G
*************************** 1. row ***************************
       Table: stats
Create Table: CREATE TABLE `stats` (
  `stat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `version` tinyint(3) unsigned NOT NULL,
  `referer` varchar(500) NOT NULL,
  `q` varchar(100) DEFAULT NULL,
  `uri` varchar(100) DEFAULT NULL,
  `server` text NOT NULL,
  `headers` text,
  PRIMARY KEY (`stat_id`)
) <b><u>ENGINE=MyISAM</u></b> AUTO_INCREMENT=21964 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
</pre>
<p>As another side note tip, try the \G instead of a semicolon (;) which provides a better vertical output.</p>
<p>Another option is to query the <a href="http://dev.mysql.com/doc/refman/5.1/en/tables-table.html">INFORMATION_SCHEMA.TABLES</a> meta data.</p>
<pre>
mysql> SELECT table_name,engine FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=DATABASE();
+--------------+--------+
| table_name   | engine |
+--------------+--------+
| stats        | MyISAM |
+--------------+--------+
1 row in set (0.00 sec)
</pre><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21215&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21215&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/18/how-do-i-find-the-storage-engine-of-a-mysql-table-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

