• r00ty@kbin.life
    link
    fedilink
    arrow-up
    17
    ·
    17 hours ago

    I never understood why people compare nosql to rdbms. They are entirely different systems with different use cases.

    Where you neee data consistency and need to always get the same results to a query go with a structured rdbms. Where you need speed over all of that (and there are real use cases for this) then nosql is for you. Using both is of course a likely result too.

    There’s of course a lot of other considerations. But they’re different tools for different situations.

    • psycotica0@lemmy.ca
      link
      fedilink
      arrow-up
      21
      ·
      15 hours ago

      I think it’s because the early marketing and hype compared NoSQL to rdbms. At the beginning they were all “hey man, don’t schemas suck? Isn’t it a pain having to migrate your data? Sometimes you just wanna cram shit somewhere, go fast, break things, and your DBA is a jackass! MongoDB”

      And people, at that time, were either like “what the fuck?” and continue to not trust it to this day, or “hell yeah brother!” and then put everything into Mongo and were surprised when it lost some data or got into a corrupted state, or at least were surprised the first time they thought “huh, I really wish there was some consistency to all this data…”

      So yeah, I think MongoDB didn’t come into the scene as “I’m a new kinda thing that has niche uses” it came on as “hey pussy, why are you still using your dad’s DB. Are you afraid?” and people still carry that in their hearts

    • cub Gucci@lemmy.today
      link
      fedilink
      arrow-up
      6
      ·
      15 hours ago

      This. Why would almost every web app use a 50 yo language designed for accountants to store like 10kB of data on a remote disk? If you’re not in the field, it should be astronomically confusing

    • expr@programming.dev
      link
      fedilink
      arrow-up
      4
      arrow-down
      2
      ·
      12 hours ago

      Mongodb is not actually faster. Postgres still beats it in any benchmark that matters.

      Nothing is ever actually schema-less. There is merely explicit and implicit schemas. If you don’t want to bother encoding the schema as proper columns and instead want the schema to remain implicitly encoded in JSON, Postgres’ jsonb columns do a better job of that than any NoSQL database does.

      • r00ty@kbin.life
        link
        fedilink
        arrow-up
        4
        ·
        16 hours ago

        I do use postgres but only as an rdb provider. I thought while it supports json data as a type, does it provide for all of the other advantages of nosql databases for their use case?

        Ultimately I feel like the best solution is to have a single database provider that could do both fully. I’m not sure it’s really there yet. But halpt to be told I’m wrong. I’ve not really needed that myself for my projects.

        • jubilationtcornpone@sh.itjust.works
          link
          fedilink
          arrow-up
          3
          ·
          13 hours ago

          The query speed isn’t quite there but I would say it’s close enough for a lot of purposes, especially with proper indexing. And JSON column fields are indexable. Two things I’ve used Postgres’ JSON functionality for are:

          1.) Storing unstructured data. 2.) Storing structured data that would exceed the table column limit.

          In both cases, I’ve typically needed to extract the relevant data from the JSON records to either be stored in another table of turned into a materialized view so live query performance on the JSON columns was not that important.

    • CallMeAnAI@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      17 hours ago

      Because nerds like to be smarter and “more efficient”.

      God forbid you fuck around when PHP though!