<?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>Peter Mac And Associates&#187; Databases</title>
	<atom:link href="http://www.petermac.com/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.petermac.com</link>
	<description>Australian freelance programmer and website design</description>
	<lastBuildDate>Tue, 24 Aug 2010 07:28:43 +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>Ruby/Rails 3 and PostgreSQL</title>
		<link>http://www.petermac.com/rubyrails-3-and-postgresql/</link>
		<comments>http://www.petermac.com/rubyrails-3-and-postgresql/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 04:48:26 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.petermac.com/?p=345</guid>
		<description><![CDATA[I&#8217;ve just spent an hour arguing with a new install of ruby 1.92, rails 3.0.2rc and PostgreSQL. Every time i tried to do a db:migrate I got a strange error. rake db:migrate (in /home/peter/projects/workspace/testapp) rake aborted! no such file to load -- pg I did the usual trawling around helpful websites, each suggesting I hadn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just spent an hour arguing with a new install of ruby 1.92, rails 3.0.2rc and PostgreSQL.</p>
<p>Every time i tried to do a db:migrate I got a strange error.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rake db:migrate<br />
(in /home/peter/projects/workspace/testapp)<br />
rake aborted!<br />
no such file to load -- pg</div></div>
<p>
I did the usual trawling around helpful websites, each suggesting I hadn&#8217;t the correct database gem installed. some referred to pg, some to postgresql, other to ruby-postgres.</p>
<p>What I have installed is listed below</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">abstract (1.0.0)<br />
actionmailer (3.0.0.rc)<br />
actionpack (3.0.0.rc)<br />
activemodel (3.0.0.rc)<br />
activerecord (3.0.0.rc)<br />
activeresource (3.0.0.rc)<br />
activesupport (3.0.0.rc)<br />
arel (0.4.0)<br />
builder (2.1.2)<br />
bundler (1.0.0.rc.2)<br />
capistrano (2.5.19)<br />
erubis (2.6.6)<br />
highline (1.6.1)<br />
i18n (0.4.1)<br />
mail (2.2.5)<br />
mime-types (1.16)<br />
minitest (1.6.0)<br />
net-scp (1.0.2)<br />
net-sftp (2.0.4)<br />
net-ssh (2.0.23)<br />
net-ssh-gateway (1.0.1)<br />
pg (0.9.0)<br />
polyglot (0.3.1)<br />
rack (1.2.1)<br />
rack-mount (0.6.9)<br />
rack-test (0.5.4)<br />
rails (3.0.0.rc)<br />
railties (3.0.0.rc)<br />
rake (0.8.7)<br />
rdoc (2.5.8)<br />
sqlite3-ruby (1.3.1)<br />
thor (0.14.0)<br />
treetop (1.4.8)<br />
tzinfo (0.3.22)</div></div>
<p>The fix for the &apos;no such file to load &#8212; pg&apos; error is to update the new Gemfile file in your application&#8217;s root folder.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#Comment out the sqlite3 requirement<br />
#gem 'sqlite3-ruby', :require =&gt; 'sqlite3'<br />
#Add a pg requirement<br />
gem 'pg', :require =&gt; 'pg'</div></div>
<p>Once you&#8217;ve done this do a bundle install from your application root folder. This ensures you have all required gems installed. Another hour wasted fighting against the machine.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo bundle install</div></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.petermac.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.petermac.com/rubyrails-3-and-postgresql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Internationalized country/state/city database</title>
		<link>http://www.petermac.com/internationalized-countrystatecity-database/</link>
		<comments>http://www.petermac.com/internationalized-countrystatecity-database/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 10:37:11 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.petermac.com/?p=292</guid>
		<description><![CDATA[I&#8217;ve just posted a little project up to the gitorious website for my and other&#8217;s pleasure. The last few freelance projects I&#8217;ve worked on have required the functionality to provide users with a way to enter their location using a prompt system by selecting country first, then entering their region/state and finally their town and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just posted a little project up to the gitorious website for my and other&#8217;s pleasure. The last few freelance projects I&#8217;ve worked on have required the functionality to provide users with a way to enter their location using a prompt system by selecting country first, then entering their region/state and finally their town and city. The database structure uses a standard Rails convention and is MySQL based. It can be very easily converted to any other SQL supported format.</p>
<p>
<a href="http://gitorious.org/internationalised-country-city-region-database" target="blank">Click here to browse to the project.</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.petermac.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.petermac.com/internationalized-countrystatecity-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading from Microsoft Access &#8211; The options</title>
		<link>http://www.petermac.com/upgrading-from-ms-access/</link>
		<comments>http://www.petermac.com/upgrading-from-ms-access/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 00:11:17 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://www.petermac.com/2008/10/26/upgrading-from-ms-access/</guid>
		<description><![CDATA[A few of my clients have had similar experiences with the Microsoft Access database system. As a light-weight non mission critical solution it offers ease of use and in the right hands can be extremely functional. The problems start usually after a few years of use when a database moves from the &#8216;useful&#8217; to the [...]]]></description>
			<content:encoded><![CDATA[<p>A few of my clients have had similar experiences with the Microsoft Access database system. As a light-weight non mission critical solution it offers ease of use and in the right hands can be extremely functional. The problems start usually after a few years of use when a database moves from the &#8216;useful&#8217; to the &#8211; &#8216;oh my God&#8230;we&#8217;re stuck &#8211; the database has fallen over!&#8217;</p>
<h2>The Database Hobbyist</h2>
<p>Microsoft Access in the right hands is a useful tool for data capture and reporting. One of my clients started to develop his own in-house client recording system around 2001. He&#8217;s in the criminal law business and has pretty specific requirements such as recording hearings and their results. He then started to move some workflow steps into his home-grown solution.  The problem is that six years later his Access database could take up to 20 seconds to perform an update.</p>
<p>The problem with MS Access is it&#8217;s not designed for large datasets especially if the data is text or image based. When you start experiencing insert and update delays and/or you&#8217;re left waiting ages for the database to start-up it&#8217;s probably time for an upgrade.</p>
<h2>Database Upgrade Options</h2>
<p>If you&#8217;re tied into the Microsoft camp (and I can&#8217;t see why you should be), you have a couple of options. You can pay the big dollars for a SQL Server installation and a relatively straight-forward data migration path using SQL Server&#8217;s data migration Wizard. You also have the lower cost option of using the Microsoft Desktop Engine (MSDE). This offers pretty much the same functionality as SQL Server but less in terms of development tools and scalability and backup options. MSDE is not for the Enterprise, it&#8217;s for the corner-shop.<br />
Alternatively if the concept of paying license fees does not sit well, you can go for the &#8216;open source&#8217; solutions of <a href="http://www.mysql.com" target="_blank">MySQL</a> (pronounced My seequel) and <a href="http://www.postgresql.org" target="_blank">PostgreSQL</a> (pronounced post gres Q L) These are database systems that have been developed by teams who provide them free of charge to the community at large. There are commercial options with each solution where you can get support agreements, training and the like, but if all you want is the database up and running on your site for free, these are the options for you.</p>
<p>Both MySQL and PostgreSQL offer migration options supplied by the database vendors (can you call someone a vendor if they give you stuff for free?). There&#8217;s also a couple of third-party solutions such as those provided by <a href="http://www.sqlmaestro.com" target="_blank">SQLMaestro</a> and <a href="http://dbconvert.com" target="_blank">DBConvert</a>.</p>
<h2>Don&#8217;t migrate bad data design</h2>
<p>Whatever solution you go for, you&#8217;ve got to be careful you don&#8217;t migrate bad database design. There&#8217;s a whole lot more to designing an efficient and workable database than using a point and click wizard to build a table to store your contacts in. Of course, at Peter Mac we&#8217;d love to help you in this regard, but if you already know what you&#8217;re doing there&#8217;s a whole lof of online support you can get from the open source communities.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.petermac.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.petermac.com/upgrading-from-ms-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
