Databases
I use MySQL, Postgres and MongoDB a lot in my work. Every now and again I find occasion to write about them.
-
MongoDB
MongoDB is a document database. One of the "NoSQL" databases that have swept the web development world, Mongo is well suited to situations in which you need to store documents that don't have a particularly rigid schema.
Is it better than a relational database? No; it's different. Which should you use? That depends entirely on your situation (and there are also many other document databases to choose from), but Mongo is well worth considering.
Articles on Databases
-
MongoDB in Action (free PDF)
Manning have been kind enough to allow me to give away a free extract from Kyle Banker's new book "MongoDB in Action". The PDF contains the section entitled "Building a Mini-Application", in which Kyle shows you how to build a small Ruby application (using MongoDB and Sinatra) to search Twitter and display the results in your browser.
-
Downgrading MySQL on Mac OS X
The MySQL installation packages for Mac OS X (on mysql.com) prevent you from downgrading MySQL. They keep track of which versions have been previously installed, and then make the brain dead assumption that you will only ever need to upgrade. It's farcical; even if you remove all copies of MySQL the installer still prevents you from installing an earlier version, unless you know where the silly buggers squirrelled away their nuts.
-
Installing the pg PostgreSQL gem on Mac OS X
You can connect to a PostgreSQL database from Ruby using the
pg
gem, but if thepg_config
program isn't in your path you'll run into problems during installation.This article is mainly here to provide some Google juice for those who hit the same problem...