DataMapper
Appearance
Datamapper is an object-relational mapper library written in Ruby and commonly used with Merb. It was developed to address perceived shortcomings in Ruby on Rails' ActiveRecord library.
Some features of Datamapper:[1]
- eager loading of child associations to avoid (N+1) queries
- lazy loading of select properties, e.g., larger fields
- query chaining, and not evaluating the query until absolutely necessary (using a lazy array implementation)
- an API not too heavily oriented to SQL databases
Datamapper was designed to be a more abstract ORM, not strictly SQL, based on Martin Fowler's enterprise pattern.[2] As a result, people have built Datamapper adapters for other non-SQL databases, such as CouchDB[3], Apache Solr[4], and webservices such as Salesforce[5].
References
- ^ http://datamapper.org/doku.php?id=why_datamapper
- ^ Fowler, Martin (2002). Patterns of Enterprise Application Architecture. Addison-Wesley. ISBN 0-321-12742-0.
{{cite book}}
: Unknown parameter|coauthors=
ignored (|author=
suggested) (help); Unknown parameter|month=
ignored (help) - ^ http://github.com/kabari/dm-couchdb-adapter/tree/master
- ^ http://github.com/lritter/dm-solr-adapter/tree/master
- ^ http://github.com/halorgium/dm-salesforce/tree/master