Over a million developers have joined DZone.

What to Look for in an ORM Solution?

·

One question that I sometimes get asked is what to look for in an ORM solution or more properly which ORM ORM_thumb[1]is preferable and why. The decision for which ORM to choose is very crucial to the project development since after you start developing it will be hard to go back and use another ORM solution. Since there are many ORMs out there, here is a checklist that will help you to evaluate ORM solutions and to pick the one that fits your needs:

  • Basic Features
    • Can handle inheritance & polymorphism
    • Can handle different types of relations (1-1, 1-N, N-M)
    • Supports transactions
    • Supports different SQL operations (aggregation, grouping, ordering)
  • Extended Features
    • Multiple databases support
    • Allows execution of dynamic queries using a query language
    • Data Binding support
    • Stored Procedure and Function support (only if needed)
    • Can handle very big models and databases
  • Flexibility
    • Allows customization of SQL queries
    • Supports Joins and Sub-Queries
    • Supports concurrency
    • Can handle specific Database types (identity, GUIDs, XML…)
  • Ease of use
    • Graphical designer for mappings
    • Auto generation of model classes
    • Generate Database schema (Model First approach)
    • Maintainable (when Database schema changes)
  • Optimizations & Performances
    • Allows Lazy loading
    • Allows Eager loading
    • First level cache
    • Second level cache
    • Optimizes queries
    • Supports Bulk updates & deletions
  • SOA
    • Supports model serialization
    • Allows loading of disconnected objects
    • Supports disconnected state tracking
    • Model objects are readable in other platforms
  • Other things to consider
    • Price
    • Performance
    • Support for multiple platforms
    • Source code provided
    • Documentation & Support
    • Maturity
    • Vendor stability

This is a suggested list and there are more things to evaluate other then that by it can help you to make the relevant decision.

Topics:

Published at DZone with permission of Gil Fink, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}