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) ...

Get Ruby Phrasebook 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.