A clone of Rails' ActiveRecord class in Ruby and SQL