SQL modeling with Ruby objects