O'Reilly logo

Ruby Phrasebook by Jason Clinton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Connecting to Databases

I selected MySQL for this chapter because it is available and well-supported on all platforms. Two other databases that you might consider are PostgreSQL and SQLite. Both are fine database systems, and I would encourage you to consider them as options before you settle on MySQL. In all the examples in this chapter, a DBD (database driver) other than mysql could be substituted and used in the same way. At the time of this writing there are 13 available database drivers: ADO, DB2, Frontbase, InterBase, mSQL, MySQL, ODBC, Oracle, OCI8, Pg, Proxy, SQLite, and SQLRelay (see Ruby DBI Documentation, http://ruby-dbi.rubyforge.org/).

Ruby’s MySQL bindings come in either the direct flavor or the DBI (database interface) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required