Is there a programming language specifically designed for interacting with SQL databases that avoids the need for Object-Relational Mappers (ORMs) to solve impedance mismatch from the start?

If such a language exists, would it be a viable alternative to PHP or Go for a web backend project?

  • ramble81@lemm.ee
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    9 months ago

    I have had Database Engineers and done it myself. If you run any ORM created SQL queries through a profiler and look at the execution plan you’ll see it’s an absolute mess. That’s why I said it doesn’t scale. Sure it’s good for small things but I’m working on projects that have millions or rows and multiple joins. At that scale it just starts to fall apart. Having good raw queries will beat out an ORM every time at scale and that’s why I hate them. You want to use it for a small quick project, go for it. You’re trying to work at enterprise scale, get a DBA to make you actual queries.

    • pixxelkick@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      9 months ago

      If you run any ORM created SQL queries through a profiler and look at the execution plan you’ll see it’s an absolute mess.

      I’ve never had this experience with Entity Framework, full stop.

      It sounds like either the devs were abusing the ORM and using it wrong to make it generate garbage, or, you were just using some very poorly written ORM.