ActiveRecord Under the Microscope

Ruby and MySQL
Location: Ballroom A Level: Intermediate

ActiveRecord has become the de facto standard for object-relational mapping in Ruby (a position that is mostly due to the popularity of Rails), and as such, it is very important to have a firm grasp of how to use it and what’s going on behind the scenes if one plans on developing Rails applications or using ActiveRecord independently with Ruby. This talk will give a very brief introduction to ActiveRecord (with a pointer to a quick reference PDF if an attendee misses something), followed by a discussion of pain points and places for improvement in ActiveRecord, and finally a short section on extending ActiveRecord to make very readable code.

While ActiveRecord’s generated SQL is very good compared to many of its peers, it’s not perfect. We’ll take a look at some of the pain points, where getting down and dirty with SQL is either (a) the only option, or (b) at the very least, the best option. Attendees should take a way a small list of general situations where SQL is a better fit.

The final portion will propose a few places where these SQL enhancements and other tricks can be used to extend and improve ActiveRecord’s API, making your code more readable and easier to reuse and maintain.

Attendees should know Ruby and probably be familiar with the concept of object-relational mapping/ActiveRecord.

Photo of Jeremy McAnally

Jeremy McAnally


Jeremy has been developing applications with Ruby and Rails for a little over five years, but before that he tortured himself with PHP, C#, Python, VB, and other instruments of destruction. After finding the light, he worked with Ruby for a while and penned Mr. Neighborly’s Humble Little Ruby Book (soon to be published by No Starch). Since then he has continued writing software, books (such as Ruby in Practice for Manning), open-source code (such as dcov, context, and more), presentations for numerous Ruby conferences and user groups, blogs at, and basically done anything he can to sharpen his Ruby (and Rails)-Fu. He likes good food, good times, and a mean game of Wii Sports Resort Tennis.

  • Kickfire
  • Zmanda, Inc.
  • Continuent
  • EDS
  • JasperSoft
  • Sun Microsystems
  • Symantec Anti-Virus Software
  • XAware
  • Data Direct Technologies
  • Dolphin Interconnect Solutions
  • Hewlett Packard
  • Infobright, Inc
  • Linagora
  • Microsoft
  • OpSource
  • Oracle
  • Pentaho
  • R1Soft
  • Red Hat
  • Ticketmaster
  • TechRepublic

Contact Us

View a complete list of MySQL contacts.