4 votes

Common ORM Misconceptions

Tags: orm, databases

3 comments

  1. [3]
    vord
    Link
    I'm banking on "knowing SQL" as my retirement plan the way "knowing COBOL" is today. OTOH Memory management has similarly been abstracted away, for better or worse. Hardware has grown powerful...

    Yet, developers sometimes generalize, “I have a tool that helps me” into “If you have a tool, you don’t need to know anything about database design.” High-level abstractions don’t always write the best code. They are susceptible to errors, and you need to understand SQL to recognize when that’s the case. If you don’t understand SQL, debugging, tuning for performance, or collating complex data becomes more tedious and frustrating.

    I'm banking on "knowing SQL" as my retirement plan the way "knowing COBOL" is today. OTOH Memory management has similarly been abstracted away, for better or worse. Hardware has grown powerful enough that more often than not it's easier to plaster over memory management losses...but data access will only get harder as we generate more of it.

    3 votes
    1. [2]
      Greg
      Link Parent
      I hadn't thought about it like that, but I like it! I find ORMs too much of an abstraction for my liking at the best of times, so I'm definitely biased, but given that I've occasionally had to...

      I'm banking on "knowing SQL" as my retirement plan the way "knowing COBOL" is today.

      I hadn't thought about it like that, but I like it! I find ORMs too much of an abstraction for my liking at the best of times, so I'm definitely biased, but given that I've occasionally had to debug situations where the query planner needed handholding to execute a handwritten piece of SQL efficiently I think (hope) we've got a while before ORMs entirely eat our lunch.

      3 votes
      1. Akir
        Link Parent
        I feel the exact same way. I can understand why ORMs are necessary when developing as part of a large team or with an open source project with many contributors, but none of the ORMs that I have...

        I feel the exact same way. I can understand why ORMs are necessary when developing as part of a large team or with an open source project with many contributors, but none of the ORMs that I have tried out have actively improved my solo dev experience in any way. It was slightly nicer when working with document-store/nosql type databases because they basically enforced a relational structure to make them "SQL-like", but when it came to working with actual SQL RDBMS systems, it ended up being far more complicated than just writing your DB interfaces directly.

        Besides that, SQL is a 4GL! It's just as easy as writing English! :P

        I can understand why others would disagree with me. A few years when I was taking a class on Microsoft SQL I could tell there were probably only 3 out of 25 people who actually enjoyed it, including myself. There were maybe 5-6 people who were understanding it with a bit of effort, and the rest of the class looked like they were in pain most of the time.

        4 votes