<?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>Chris Miller &#187; database</title>
	<atom:link href="http://chris-miller.org/archives/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://chris-miller.org</link>
	<description>Life, and how to live it!</description>
	<lastBuildDate>Tue, 24 Jan 2012 14:41:21 +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>Sequel Pro: Manage MySQL Databases under Mac OS X</title>
		<link>http://chris-miller.org/archives/2010/04/08/sequel-pro-manage-mysql-databases-under-mac-os-x/</link>
		<comments>http://chris-miller.org/archives/2010/04/08/sequel-pro-manage-mysql-databases-under-mac-os-x/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 12:27:41 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Essential Apps]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[DBMS]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHPMyAdmin]]></category>
		<category><![CDATA[Sequel Pro]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://chris-miller.org/?p=378</guid>
		<description><![CDATA[I do a lot of web development; it&#8217;s my full time job, my hobby and a means to potentially earn some money on the side. I need a set of good tools in order to make aspects of the work easier or I&#8217;d spend my entire life at odds with what I do. A good [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://chris-miller.org/wp-content/uploads/2010/02/Sequel-Pro-Icon.png" alt="Sequel Pro Icon" title="Sequel Pro Icon" width="105" height="128" class="alignright size-full wp-image-380" /><br />
I do a lot of web development; it&#8217;s my full time job, my hobby and a means to potentially earn some money on the side.  I need a set of good tools in order to make aspects of the work easier or I&#8217;d spend my entire life at odds with what I do.  A good Database Management System (DBMS) tool is one such tool since database management and manipulation plays such a large part of developing any content managed website, especially for quick modifications, testing and deployment.</p>
<p>MySQL is my DB of choice, due to working mainly on <abbr title="Linux, Apache, MySQL and PHP">LAMP</abbr> architecture systems.  The best tool by far I&#8217;ve found for managing MySQL databases under Mac OS X is <a target="_blank" href="http://www.sequelpro.com/" title="View the Sequel Pro website">Sequel Pro</a> (previously CocoaMySQL).</p>
<p><span id="more-378"></span><br />
<div id="sequel-pro-manage-mysql-databases-under-mac-os-x_image1" class="wp-caption aligncenter" style="width: 560px"><img src="http://chris-miller.org/wp-content/uploads/2009/12/Sequel-Pro-Scaled.png" alt="Sequel Pro interface showing the table editor view" title="Sequel-Pro-Scaled" width="550" height="401" class="size-full wp-image-387" /><p class="wp-caption-text">Sequel Pro interface showing the table editor view</p></div><br />
Sequel Pro is a very streamlined and powerful program for database management, it provides the facility to add, modify and remove entire databases; supports various import and export formats for singular tables, entire databases or selected query results; allowing modification of table properties as well as inline SQL querying.</p>
<p>Before finding Sequel Pro I was a full-time user of PHPMyAdmin, a system which I continue to use in some instances.  Sequel Pro essentially provides a desktop solution that is very similar to PHPMyAdmin, anyone who has experience using PHPMyAdmin should have no problems to adjusting to using Sequel Pro in its stead.</p>
<p><div id="sequel-pro-manage-mysql-databases-under-mac-os-x_image2" class="wp-caption aligncenter" style="width: 560px"><img src="http://chris-miller.org/wp-content/uploads/2009/12/Annotated-Sequel-Pro.png" alt="Caption" title="Annotated Sequel Pro" width="550" height="401" class="size-full wp-image-379" /><p class="wp-caption-text">Annotated Sequel Pro</p></div><br />
<a href="#sequel-pro-manage-mysql-databases-under-mac-os-x_image2" title="Sequel Pro Annotated View" onmouseover="document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.borderColor = '#2266aa'; document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.borderWidth = '2px'; document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.paddingTop = '3px'; document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.paddingBottom = '0px';" onmouseout="document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.borderColor = '#d6d6d6'; document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.borderWidth = '1px'; document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.paddingTop = '4px'; document.getElementById('sequel-pro-manage-mysql-databases-under-mac-os-x_image2').style.paddingBottom = '1px';">The image above</a> is an annotated view of the Sequel Pro interface, the main portions of the interface that I use day-to-day are highlighted and numbered, each of the numbered areas correspond to:</p>
<ol>
<li>
<h4>Database Selector</h4>
<p>		A basic drop-down list where you can select a database to work with or add a new database.
	</li>
<li>
<h4>Table Selector</h4>
<p>		The list of tables in the currently selected database.  If the number of tables is large enough a filter field appears at the top of this list allowing you to filter the tables based upon their names.  Below the list of tables is a small section with meta-data on the currently selected table, under this is the controls for the database tables.  From here we can add, remove, duplicate and truncate tables with ease (with conformation on the obviously destructive actions).
	</li>
<li>
<h4>Field Viewer/Editor</h4>
<p>		This portion of the interface is controlled by whichever view is selected from the icons appearing in the application toolbar.
	</li>
<li>
<h4>Keys Viewer/Editor</h4>
<p>		This area allows you to manage keys and indexes of the table you&#8217;re viewing.  The +/- toggle at the bottom left allows you to add and remove keys/indexes.
	</li>
<li>
<h4>Structure View (shown)</h4>
<p>		Changes the view to the structure view as shown and detailed above.
	</li>
<li>
<h4>Table Contents View</h4>
<p>		Switches to the table contents view.
	</li>
<li>
<h4>SQL Query Editor</h4>
<p>		Switches to the SQL query editor view.
	</li>
</ol>
<p>Another of the real selling points for Sequel Pro for me is the ability to easily import and export data.  From the <code>File > Export</code> menu you can export data in various formats, <code>CSV</code> and <code>XML</code> being the most useful.<br />
<img src="http://chris-miller.org/wp-content/uploads/2009/12/sequel_pro_export.png" alt="sequel_pro_export" title="sequel_pro_export" width="107" height="28" class="alignright size-full wp-image-382" /></p>
<p><abbr title="Cmd + Shift + I">&#8984;+&#8679;+I</abbr> invokes the import dialog which allows you to select an SQL dump or CSV of values to import into the selected database.  The SQL import will obviously just run the query and update the various tables as required, the CSV import on the other hand allows you to select the table and marry rows in the CSV file to those in the table you wish to import to.</p>
<h3 style="vertical-align: center; line-height: 38px; background-image: url( 'http://chris-miller.org/wp-content/uploads/2009/12/table_structure.png' ); background-repeat: no-repeat; padding-left: 35px;">
	Table Structure<br />
</h3>
<p>As detailed above the table structure view allows you to define the structure of the tables in the database and to set up the indexing and keys for the fields.</p>
<p>A nice touch available here is the ability to reorder pre-existing fields by dragging and dropping them in the relevant places and the ability to duplicate fields rather than have to re-enter details for virtually identical fields.</p>
<h3 style="vertical-align: center; line-height: 38px; background-image: url( 'http://chris-miller.org/wp-content/uploads/2009/12/table_contents.png' ); background-repeat: no-repeat; padding-left: 35px;">
	Table Contents<br />
</h3>
<p>From there you can add, modify, duplicate and delete rows in the table, all of which you&#8217;d really expect from the table contents view.</p>
<p>Again, like the table structure view, you can duplicate entries to save re-entering similar data.  Inserting <code>NULL</code> values is as simple as hitting <abbr title="Ctrl + Shift + N">^+&#8679;+N</abbr>.  Copying rows as INSERT statements is a big plus (<abbr title="Ctrl + Optn + Cmd + C">^+&#8997;+&#8984;+C</abbr>) and useful when copying singular entries between a development and live database, rather than dumping the data from a custom query.</p>
<h3 style="vertical-align: center; line-height: 38px; background-image: url( 'http://chris-miller.org/wp-content/uploads/2009/12/sql_query.png' ); background-repeat: no-repeat; padding-left: 35px;">
	SQL Query<br />
</h3>
<p>This view allows you to enter queries and run them against the database.  The editor itself has autocompletion and some niceties like smart quoting of field names.</p>
<p>The power here comes from the ability to store previously used queries and access recent queries via a query history.  Any of the generated result sets can be exported in the previously mentioned formats for easy data filtering and export.</p>
<h3>
	In summary<br />
</h3>
<p>It&#8217;s a bloody useful tool and a <em>must</em> for anyone working with MySQL databases under Mac OS X.  It&#8217;s not a silver-bullet solution of course; it doesn&#8217;t do much more than PHPMyAdmin and the things it does can be replicated in PHPMyAdmin with relative ease; but then it can&#8217;t be a bad thing to have lying about, especially since it&#8217;s free!</p>
<ul>
<li>You can <a href="http://www.sequelpro.com/" title="Download Sequel Pro">download a copy of Sequel Pro from their website</a>.</li>
<li>Developed by <a href="http://www.mjmedia.com.au/" title="mjmedia">mjmedia</a>.</li>
</ul>
<p>Go have a play with Sequel Pro <em>now</em>,<br />
- Chris</p>
]]></content:encoded>
			<wfw:commentRss>http://chris-miller.org/archives/2010/04/08/sequel-pro-manage-mysql-databases-under-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Database and Internet Technology 4</title>
		<link>http://chris-miller.org/archives/2005/05/19/database-and-internet-technology-4/</link>
		<comments>http://chris-miller.org/archives/2005/05/19/database-and-internet-technology-4/#comments</comments>
		<pubDate>Thu, 19 May 2005 17:22:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[DBIT]]></category>
		<category><![CDATA[exam]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://chris-miller.org/blog/index.php/archives/2005/05/19/database-and-internet-technology-4/</guid>
		<description><![CDATA[Review of the DBIT4 exam.]]></description>
			<content:encoded><![CDATA[<p>So today was host to the DBIT4 exam, one which was either going to be easy enough or a stinger.  Fortunately it was relatively well received by all.</p>
<p><span id="more-92"></span>Being four out of four questions, I was a bit dubious about some of the course material that I was less clued-up-on coming up.  The spread, however, was quite pleasing; covering all the main points of the course &#8211; none in too much detail!</p>
<h3>
		Question 1<br />
</h3>
<ul>
<li><span class="green">A</span> &#8211; Definition of statelessness wrt HTTP, naming an advantage and disadvantage<small>[3]</small></li>
<li><span class="green">B</span> &#8211; Outlining DNS resolution<small>[5]</small></li>
<li><span class="green">C</span> &#8211; Comparison of UDP to TCP <small>[3]</small></li>
<li><span class="orange">D</span> &#8211; Discussion of IPv6 improvements on IPv4 <small>[7]</small></li>
<li><span class="green">E</span> &#8211; Public key algorithms, use for encryption and integrity verification <small>[7]</small></li>
</ul>
<h3>
		Question 2<br />
</h3>
<ul>
<li><span class="green">A</span> &#8211; Passing parameters to middleware applications <small>[2]</small></li>
<li><span class="orange">B</span> &#8211; Scripting for DB update (I used PHP) <small>[12]</small></li>
<li><span class="green">C</span> &#8211; Justification of technology used in B and comparsion with other technology <small>[5]</small></li>
<li><span class="green">D</span> &#8211; Benefits challenges of using JavaScript, example solution to earlier problem <small>[6]</small></li>
</ul>
<h3>
		Question 3<br />
</h3>
<ul>
<li><span class="green">A</span> &#8211; Define <em>valid</em> and <em>well-formed</em> wrt XML documents <small>[2]</small></li>
<li><span class="green">B</span> &#8211; Writing DTD for specified XML document <small>[7]</small></li>
<li><span class="green">C</span> &#8211; Schemas question, advantage and disadvantage of use <small>[3]</small></li>
<li><span class="red">D</span> &#8211; XPATH question <small>[3]</small></li>
<li><span class="orange">E</span> &#8211; Main differences between SAX and DOM <small>[4]</small></li>
<li><span class="green">F</span> &#8211; SAX or DOM pseudo-program <small>[6]</small></li>
</ul>
<h3>
		Question 4<br />
</h3>
<ul>
<li><span class="green">A</span> &#8211; E-commerce effects on offline shopping <small>[5]</small></li>
<li><span class="orange">B</span> &#8211; Increasing search engine exposure <small>[4]</small></li>
<li><span class="green">C</span> &#8211; Desirable features of DB for web content <small>[5]</small></li>
<li><span class="orange">D</span> &#8211; Web service advertisement and location <small>[6]</small></li>
<li><span class="red">E</span> &#8211; CORBA expansion and explination of how a request is demultiplexed <small>[5]</small></li>
</ul>
<p>Although most of the paper went fine, I forgot how to update a DB using PHP!  Also I just didn&#8217;t know the CORBA expansion and didn&#8217;t have a clue about the demultiplexing (didn&#8217;t read it).  I did however draw a COBRA in the exam, labeled it and gave it <span class="red">red</span> eyes.</p>
<p>Here&#8217;s hoping tomorrow goes as well,<br />
- Chris</p>
]]></content:encoded>
			<wfw:commentRss>http://chris-miller.org/archives/2005/05/19/database-and-internet-technology-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Downtime</title>
		<link>http://chris-miller.org/archives/2004/11/18/downtime/</link>
		<comments>http://chris-miller.org/archives/2004/11/18/downtime/#comments</comments>
		<pubDate>Thu, 18 Nov 2004 20:00:49 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://chris-miller.org/blog/index.php/archives/2004/11/18/downtime/</guid>
		<description><![CDATA[My site was down for X many hours since last night...]]></description>
			<content:encoded><![CDATA[<p>Last night I decided to update all the Debian packaged which were installed on my server.  As this server runs Debian it was just a case of using <code>apt-get update</code>.  This apparently didn&#8217;t go all to plan.</p>
<p><span id="more-40"></span>After updating the packages, I checked to see if the server was running properly, it apparently was as I could load pages from the server.  I didn&#8217;t reallise that these were probably the cached pages from previous visits I had made.</p>
<p>Today, whilst checking the site again and trying to do some database work, I was continually receiving alerts saying:</p>
<blockquote><p>This document contains no data</p></blockquote>
<p>Whoops!  After restarting apache all seems to be working correctly.  If anyone has any problems please mail me to let me know and I will endevour to sort them out.</p>
<p>Damn Debian packages,<br />
- Chris</p>
]]></content:encoded>
			<wfw:commentRss>http://chris-miller.org/archives/2004/11/18/downtime/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

