DataMapper
Appearance
DataMapper is an object-relational mapper library written in Ruby that follows the active record pattern. 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, DataMapper adapters have been built for other non-SQL databases, such as CouchDB,[3] Apache Solr,[4] and webservices such as Salesforce.[5]
References
- ^ http://datamapper.org/why
- ^ Fowler, Martin (November 2002). Patterns of Enterprise Application Architecture. Addison-Wesley. ISBN 0-321-12742-0.
{{cite book}}
: Unknown parameter|coauthors=
ignored (|author=
suggested) (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