Skip to content

What are the benefits of ORM?

I’ve been looking at a few different ORM implementations for ColdFusion, including the native ColdFusion 9 implementation and Transfer ORM, and I’m having a hard time wrapping my head around the benefits of using it.  I understand that you can write things once, and then use that same code to connect to just about any database, but it also seems like an additional layer of complexity and abstraction that doesn’t provide many other benefits.  Especially in the case where you’re not planning on interfacing with more than a single database type, it seems like a significant burden to not only create your database objects, but then recreate them in an ORM.

To clarify, I’ve been using ColdFusion for about 7 years now, and I’ve worked extensively with mySQL, Microsoft SQL Server, and, most recently, four years with Oracle PL/SQL, and much of the work I do does not reference database tables directly, but calls (often complex) views and stored procedures to read and write the data I’m working with.  It’s usually no trouble at all for me to whip together what I need in the database and then call it from the ColdFusion code.

That said, are there any benefits to using ORM functionality that I’m missing?  I’ve read how much people enjoy working with it, but all I’m seeing as I read the documentation is more work without a whole lot of benefit (especially with how I’m used to working with my databases).

So, what’s so great about ORM?

Published incoldfusionprogramming

2 Comments

  1. Mark Mark

    No, you’re not missing anything at all. ORM’s are a huge waste of time. They create way too much code and put extra strain on the DBMS.

    • Greg Nilsen Greg Nilsen

      I know part of my concerns is that an ORM wouldn’t allow for an Oracle database to optimally use the best execution plan for a query if it sees each query as a one-off call. Native views and stored procedures appear better from a performance standpoint. Not sure if this is as much of a concern with MySQL or the latest SQL Server.

Leave a Reply