A.5. Databases

Most Rails applications use MySQL, which is available at http://dev.mysql.com. The free version is called MySQL Community Edition. Right now, there's a stable 5.0 branch, a beta 5.1 branch, and an alpha 6.0 branch. Choose the binary that corresponds to your operating system.

You should also consider the administrative tools, the MySQL Administrator and the MySQL Query Browser, which are available at http://dev.mysql.com/downloads/gui-tools/5.0.html. The interfaces are a little on the clunky side, but they will let you see what's going on in your database. Your platform may have third-party MySQL administrative applications as well.

For smaller projects, consider SQLite, which is available at www.sqlite.org. It has binaries for Linux and Windows. An older version of SQLlite was included in Mac OS X 10.4. As of Rails 2.0.2, SQLite is the default database for new Rails applications. The database.yml file generated by Rails contains instructions for using SQLite.

Get Professional Ruby on Rails™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.