Those who know, know.

  • Waldowal@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    4 months ago

    The consultancy I used to work for in the late 90s would have crucified any developer that didn’t write “a data abstraction layer that allows you to pop off the original db and substitute a different one later”.

    How many times in my 25 year career have I swapped out the database (and been thankful for such an abstraction layer)? 0 times.

    • Tja@programming.dev
      cake
      link
      fedilink
      arrow-up
      10
      ·
      4 months ago

      In my 15 year career? Dozens. Maybe low hundreds. Depends what you work on. Oracle is not making any friends lately and a ton of companies a whole-sale migrating to Postgres, MongoDB, DynamoDB or some of the NewSQL contenders. It’s like 50% of the projects I’m involved in. Results are generally positive, with some spectacular wins (x3000 acceleration or x1000 lower costs) and a few losses.

    • evatronic@lemm.ee
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      4 months ago

      I am literally in the middle of swapping DynamoDB for a RDBMS.

      The idea that you can abstract away such fundamentally different data stores is silly. While I hate doing it now, reworking the code to use relational models properly makes for a better product later.

      • Tja@programming.dev
        cake
        link
        fedilink
        arrow-up
        2
        ·
        4 months ago

        It’s literally what an orm does, and it’s good enough for 80% of apps out there. Using it for the wrong purpose is what’s silly.

        • evatronic@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          4 months ago

          I see. It seems like you may be one of the people that try to coerce relational models into nosql stores like Dynamo.

          Or course it’s possible. They even trick you into thinking it’s a good pattern by naming things “tables”.

          But if you’re using Dynamo to its fullest an ORM is not going to be able to replicate that into a relational store without some fundamental changes.

          • Tja@programming.dev
            cake
            link
            fedilink
            arrow-up
            1
            ·
            4 months ago

            Hence 80%.

            Most apps out there are a CRUD with a thin layer of logic.

            If you are in the 20% that needs real performance, an ORM is not gonna cut it, no matter what DB you have.

      • Caveman@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        4 months ago

        I’m going to suggest not using an ORM. I used three so far and it really likes to tell you what you can and can’t do when query builders can do the same thing by creating the SQL string for you. SQL is also very nice and easy (just parameterise all inputs to avoid the SQL injection)

    • prof@infosec.pub
      link
      fedilink
      arrow-up
      2
      ·
      4 months ago

      While he advocates for it, that’s also a point that Martin brings up multiple times when he talks about his project “fitnesse”.

      Basically saying that they left it open how stuff can be saved, but the need has never arisen to actually pivot to a different system.