<p>I've been taking a look at some different products for .NET which propose to speed up development time by providing a way for business objects to map seamlessly to an automatically generated database. I've never had a problem writing a data access layer, but I'm wondering if this type of product will really save the time it claims. I also worry that I will be giving up too much control over the database and make it harder to track down any data level problems. Do these type of products make it better or worse in the already tough case that the database and business object structure must change?</p>

<p>For example:
<a href="http://www.devexpress.com/Products/NET/ORM/" rel="nofollow noreferrer">Object Relation Mapping from Dev Express</a></p>

<p>In essence, is it worth it? Will I save "THAT" much time, effort, and future bugs?</p>

[{'answer_id': 28786, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 0, 'selected': False, 'text': '<p>There are lots of choices of ORMs.  Linq to Sql, nHibernate.  For pure object databases there is db4o.</p>\n\n<p>It depends on the application, but for a high volume enterprise application, I would not go this route.  You need more control of your data.</p>\n'}, {'answer_id': 28787, 'author': 'Dana the Sane', 'author_id': 2567, 'author_profile': 'https://Stackoverflow.com/users/2567', 'pm_score': 0, 'selected': False, 'text': "<p>I was discussing this with a friend over the weekend and it seems like the gains you make on ease of storage are lost if you need to be able to query the database outside of the application. My understanding is that these databases work by storing your object data in a de-normalized fashion. This makes it fast to retrieve entire sets of objects, but if you need to select data from a perspective that doesn't match your object model, the odbms might have a hard time getting at the particular data you want. </p>\n"}, {'answer_id': 28795, 'author': 'Tony Lenzi', 'author_id': 3033, 'author_profile': 'https://Stackoverflow.com/users/3033', 'pm_score': 1, 'selected': False, 'text': '<p>I\'ve found <a href="http://ibatis.apache.org/" rel="nofollow noreferrer">iBatis</a> from the Apache group to be an excellent solution to this problem.  My team is currently using iBatis to map all of our calls from Java to our MySQL backend.  It\'s been a huge benefit as it\'s easy to manage all of our SQL queries and procedures because they\'re all located in XML files, not in our code.  Separating SQL from your code, no matter what the language, is a great help.</p>\n\n<p>Additionally, iBatis allows you to write your own data mappers to map data to and from your objects to the DB.  We wanted this flexibility, as opposed to a Hibernate type solution that does everything for you, but also (IMO) limits your ability to perform complex queries.</p>\n\n<p>There is a .NET version of iBatis as well.</p>\n'}, {'answer_id': 28837, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>I\'ve recently set up <a href="http://www.castleproject.org/projects/activerecord/" rel="nofollow noreferrer">ActiveRecord</a> from the Castle Project for an app.  It was pretty easy to get going.  After creating a new app with it, I even used MyGeneration to script out class files for a legacy app that ActiveRecord could use in a pretty short time.  It uses NHibernate to interact with the database, but takes away all the xml mapping that comes with NHibernate.  The nice thing is though, if necessary, you already have NHibernate in your project, you can use its full power if you have some special cases.  I\'d suggest taking a look at it.</p>\n'}, {'answer_id': 28868, 'author': 'JasonS', 'author_id': 1865, 'author_profile': 'https://Stackoverflow.com/users/1865', 'pm_score': 3, 'selected': True, 'text': '<p>I have used SubSonic and EntitySpaces.  Once you get the hang of them, I beleive they can save you time, but as complexity of your app and volume of data grow, you may outgrow these tools.  You start to lose time trying to figure out if something like a performance issue is related to the ORM or to your code.  So, to answer your question, I think it depends.  I tend to agree with Eric on this, high volume enterprise apps are not a good place for general purpose ORMs, but in standard fare smaller CRUD type apps, you might see some saved time.</p>\n'}]
['https://Stackoverflow.com/questions/28768', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/12081/']