Home > Uncategorized > When not to use ORM?

When not to use ORM?

I was recently in a discussion where I shared that ORM might not be a good tool for applications whose main focus is to:

  1. provide UI for editing data in the database tables
  2. simply generate reports of the database data

I feel that ORM is a great tool when you have a solid domain model but from what I have seen, you really don’t need a domain model to “interface” database tables. 

Any thoughts??

Categories: Uncategorized Tags:
  1. kiran
    June 14th, 2008 at 01:47 | #1


    ORM is not “necessary” (but not necessarily ‘not good’) for applications whose main focus is to provide UI for editing data. But ORM still provides lots of advantages (I am assuming the application is of nontrivial scale)

    1. Your developers do not need to learn SQL if they dont already know it.
    — This might seem of little significance, but in real projects, it is very important. What if your developers introduce SQL injection attacks into the code, because they are just SQL novices. Java/C# developers might be more comfortable with an OO model of development than learning the functional approach demanded by SQL.

    2. Database platform independence (Allows you to migrate databases without too much effort)

    3. Dont need to be overflown with details if your data comes from different formats and platforms(XML, Access, Oracle)

    Ofcourse, there are some side effects like performance.

    So, UNLESS your application is really trivial or if performance is extremely critical in your application or if you are confident the complexity of tables and relationshiops is not going to grow that much, ORM might work out for your advantage.

    Think about it.

  1. No trackbacks yet.