ORM vs Stored Procedures : Which one to use ?

Поделиться
HTML-код
  • Опубликовано: 4 авг 2024

Комментарии • 21

  • @softwarearchitecturematter4482
    @softwarearchitecturematter4482  3 года назад

    Subscribe to this channel for your regular updates by clicking the following link
    rb.gy/u1z0k0

  • @rayvid7979
    @rayvid7979 3 года назад +5

    been 20 years building database driven application using java + oracle. I found that an app instilled with ORM ended up being a horrible nightmare. stored procedure is way much better in most aspect.

    • @softwarearchitecturematter4482
      @softwarearchitecturematter4482  3 года назад

      Hi Ray,
      I respect your decision.
      What is ORM's deal breaker for you ?
      ORM performance has increased significantly in recent year.
      Thank you,
      Vikas Kerni

    • @FaizanPinjari
      @FaizanPinjari 3 года назад

      Ray,
      You have acquired a comfort zone.

  • @ajitsaharan9445
    @ajitsaharan9445 3 года назад +3

    I like the Store procedure Approach where we can easily establish a relationship between tables + performing better when we insert a large amount of data using XML + easy to deploy. I found the only drawback is unit testing.

    • @softwarearchitecturematter4482
      @softwarearchitecturematter4482  3 года назад +2

      Hi Ajit,
      People end up writing lot of business logic inside stored procedures which makes it more difficult to unit test and maintain.
      Take care,
      Vikas

  • @dowoyele
    @dowoyele 3 года назад +1

    Thank you for this video. It was really insightful

  • @shekhardalvi1283
    @shekhardalvi1283 3 года назад +1

    Hi Vikas. I love the video. Thanks for sharing

  • @bgm3340
    @bgm3340 2 года назад +1

    I use both on same server ~

  • @kamildobrowolski143
    @kamildobrowolski143 3 года назад +1

    Hi Vikas. I love the video. Very nice comparison.
    I’m actually torn between the two. I had someone build an application for me using raw SQL queries via SQLAlchemy and then pass the result to Pandas. Now I’m having a different developer refactor the code to use the django ORM. As a non-developer, I’m not sure what is best for this application. Performance is not critical though the application should be robust. I do plan for the application to evolve considerably. I’m also concerned about finding developers in the future that can pick up up the code and work with it. Any guidance would be appreciated my friend.

    • @kamildobrowolski143
      @kamildobrowolski143 3 года назад

      I rewatched the video a few times and I think you answered my question already. I think going with the ORM is the way to go for me. Let me know if you have any comments about it.

    • @softwarearchitecturematter4482
      @softwarearchitecturematter4482  3 года назад

      Hi Kamil,
      I would not refactor sql queries for existing applications or functionality to ORM. I would definitely refactor stored procedures to
      ORM on case to case basis. I would definitely use ORM for new applications and functionality.
      Vikas

    • @kamildobrowolski143
      @kamildobrowolski143 3 года назад +1

      Thank you, and I hope your channel grows. You have great content.

    • @softwarearchitecturematter4482
      @softwarearchitecturematter4482  3 года назад

      Also you are looking for ease of maintenance and training new developers , ORM is a big plus

    • @kamildobrowolski143
      @kamildobrowolski143 3 года назад

      Yes, those are certainly important factors I considered. I’m continuing to have my new developer we factor the code to use the Django ORM for many reasons including the fact that I want to expand this application to have new features.

  • @saimch.9388
    @saimch.9388 8 месяцев назад

    Complex queries can only be written in views and stored procedurs. So Sps are best. Big no to ORM

  • @FaizanPinjari
    @FaizanPinjari 3 года назад +3

    ORM is a better solution overall I Believe.
    1- Fast and continuous delivery
    2 - Code versioning

  • @santhoshm9193
    @santhoshm9193 4 года назад +1

    ORM.
    project maintainable is first.
    Performance is second.