DEV Community

Discussion on: ORM vs. SQL?

Collapse
 
databasesponge profile image
MetaDave 🇪🇺

Does ActiveRecord count as a data mapper? It seems to meet some of the criteria.

Collapse
 
dmfay profile image
Dian Fay

From what I know it's an O/RM; the "active record" pattern is in common usage in that field. That said, I've done about thirty minutes of Ruby work in my entire life and none of it with Rails. It looks like AR-the-library automates some of the modeling but entities have their own persistence methods (JavaScriptily, thing.save() instead of things.save(aThing)) and you're tracking state in your application code, which are the quintessential characteristics of O/RMs.