Add basic ActiveRecord database handling