Why I switched from MongoDB to PostgreSQL (Rasmus Porsager)

Поділитися
Вставка
  • Опубліковано 25 сер 2024
  • From the "JS Party" podcast. More 👉 jsparty.fm/
    Subscribe for more! 👇
    Apple: jsparty.fm/apple
    Spotify: jsparty.fm/spo...
    Android: jsparty.fm/and...
    Overcast: jsparty.fm/ove...
    Email: jsparty.fm/email
    Twitter: / jspartyfm
    #javascript #css #webdevelopment #webdev #opensource #softwaredevelopment #softwareengineering #js #frontend #backend #nodejs #podcast

КОМЕНТАРІ • 19

  • @_Iam777_
    @_Iam777_ 2 роки тому +22

    he opted to swap ships because he discovered the beauty of SQL, which it is fine, flavors and colors are in the garden. Honestly, I thought he will talk about any technical limitation he found, for example, performance, scalability, etc. etc.

  • @cheetah100
    @cheetah100 2 роки тому +29

    I've been using SQL since the the mid 90's. I've also been using MongoDB now for about five years. The moral of the story is horses for courses - use the right tool for the right job. When you have highly structured data SQL is more efficient. If however you want to build a system which has dynamic schemas at runtime MongoDB is hard to beat. A SQL schema is typically developed at design time and burnt into the binary. Changing a SQL structure can be a royal pain involving migration scripts. MongoDB allows you to store data in user defined structures. Often you still have a schema, but it is not imposed or enforced by Mongo. It is a runtime artifact which can be modified to suit the needs of users. Mongo isn't a drop in replacement for a SQL database, and if you use it that way you end up with the worst of both worlds.

  • @xelhuajosephcoronaperez3531
    @xelhuajosephcoronaperez3531 7 місяців тому +14

    you didnt answer why ...

  • @AgentZeroNine1
    @AgentZeroNine1 2 роки тому +5

    Though I VERY MUCH prefer document databases like MongoDB over SQL databases like MySQL and Post, I think all developers need to know at least one of each, alongside knowing how to utilize MongoDB's JSON schema functionality for implementing schemas.
    Also, when using MongoDB, dump Mongoose in favor of creating models via JavaScript classes. Each class/model should (obviously) feature find, post, delete, etc methods. Mongoose is one of those abstractions that is very unneeded, but just adds another layer of complexity.

    • @aberba
      @aberba Місяць тому

      Mongoose adds complexity? What about it make makes it complex? Even the official mongodb package has schema definition similar to mongoose

  • @damientech88
    @damientech88 Місяць тому

    I'm an old school SQL guy but I'm currently learning MongoDB and it's got it's uses but they are very niche IMO.

  • @krisnrg
    @krisnrg Рік тому +2

    The most I use mongo the more I have complete distain for it.

  • @EzequielRegaldo
    @EzequielRegaldo Рік тому +7

    Lol we migrated from PostgreSQL to Mongo because its performing better. You shouldnt use mongoose, its a performance killer

    • @bahrambayramli4343
      @bahrambayramli4343 Рік тому

      Which tool you should prefer?

    • @EzequielRegaldo
      @EzequielRegaldo Рік тому +1

      @@bahrambayramli4343 today after 10 years we used everything and if i have to choose: angular + net core + mongo are awesome

    • @drblahblah929
      @drblahblah929 Рік тому

      Do you use mongodb driver instead of mongoose?

    • @EzequielRegaldo
      @EzequielRegaldo Рік тому

      @@drblahblah929 yes

    • @shivajivarma
      @shivajivarma 9 місяців тому +1

      @@drblahblah929 absolutely. ODM will have limitations as you scale. Good to use direct driver, as you have full control.

  • @zcizzorhandz5567
    @zcizzorhandz5567 Рік тому +6

    Apples vs oranges. Relational vs NoSQL should not be a preference.
    They're tools. Use the best tool for the job.
    Relational = relational data
    NoSQL = non-relational data
    You're going to lose out on a huge amount of performance if you can differentiate between the two.
    There is no one size that fits all.

    • @krisnrg
      @krisnrg Рік тому +2

      There are very few reasons to ever use noSql

    • @zcizzorhandz5567
      @zcizzorhandz5567 Рік тому +1

      @@krisnrg There are very few reasons to ride a unicycle but there are still valid reasons to.

  • @emi6029
    @emi6029 5 місяців тому +1

    Nonsense. He has no good reason for switching.
    Did you encounter any performance issues?
    Did you encounter any scaling problems?
    No reasonable point. I just feel this is just meant to diss Mongodb.