Spring Data JDBC: Beyond the Obvious

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น • 25

  • @ivansimic3817
    @ivansimic3817 2 ปีที่แล้ว +1

    Thank you Jens for all the effort behind leading and spreading the word of the SpringDataJDBC. It definitely helped me understand and set the boundaries of my system and get started practically with the DDD for my use case. Only things that worries me is the performance impact caused by the update of the aggregate that has a list, and the delete insert that goes with it. My use case is that the 'parent' has the list of 'children', and I am updating the list of 'children' in every interaction with the user by adding new entry to the list and persisting (usually there are 5-10 actions during one user interaction cycle). Maybe I could have modeled the system differently still, will see. Cheers, Ivan

  • @praveens2272
    @praveens2272 2 ปีที่แล้ว +5

    Guys don't underestimate spring jdbc. It's not obsolete. It makes your life less miserable when you have real production RDBMS in place. What I mean is just make a call to complex sql queries and get the data. Fuck spring data jpa. Spring data jpa will be useful only when giving demos not with real world RDBMS's.

    • @hardcorecode
      @hardcorecode 9 หลายเดือนก่อน +1

      learn your tool before using it. Why do you think spring data jpa is so popular?

    • @praveens2272
      @praveens2272 9 หลายเดือนก่อน

      @@hardcorecode if you want to drive your database from code then jpa is best. But what about existing database with complex relations between tables.

    • @hardcorecode
      @hardcorecode 9 หลายเดือนก่อน

      @@praveens2272 when I hear complex relations I immediately think of composite keys, which Spring Data JDBC doesn't support. I would model the database in JPA and set it to validate and NOT CREATE or UPDATE. jpa is built for complexity!

  • @manideepkumar959
    @manideepkumar959 ปีที่แล้ว +1

    Hi jen, when to for data jdbc over plain jdbc, what are the main advantages?

    • @yt-1337
      @yt-1337 ปีที่แล้ว

      plain jdbc doesnt have repositories and all the convenience features, same like jpa/hibernate vs data jpa, spring data is much easier

  • @MORETHANOVERGROWN
    @MORETHANOVERGROWN 3 ปีที่แล้ว

    Is there any validation performed on the database schema like is done by Hibernate on startup with spring data jpa?

  • @omkar.at.office
    @omkar.at.office 2 ปีที่แล้ว

    Awesome session! Thanks.

  • @tejap463
    @tejap463 3 ปีที่แล้ว +1

    Great talk, wish you could have explained more on why we should we use spring data jdbc instead of spring data jpa.

    • @pkphilips2
      @pkphilips2 2 ปีที่แล้ว +1

      The primary benefit is that Spring JDBC allows much greater control over the data fetching, caching etc than JPA

    • @匿名-x5m
      @匿名-x5m ปีที่แล้ว

      @@pkphilips2 Isn't JPA also allows greater control over the data fetching since it allows writing native queries? Or am I wrong?

    • @pkphilips2
      @pkphilips2 ปีที่แล้ว

      @@匿名-x5m Actually, direct JDBC access also provides native queries and you can return resultsets instead of mapping them to objects.. this can be useful in some circumstances

    • @匿名-x5m
      @匿名-x5m ปีที่แล้ว +1

      @Prem Kurian Philip Oh I see, understood. Thank you

  • @praveens2272
    @praveens2272 2 ปีที่แล้ว +4

    We have a large database with complex relationships between multiple tables. My fucking manager asked me to use spring data jpa instead of spring jdbc. I sent my resignation.

    • @hardcorecode
      @hardcorecode 9 หลายเดือนก่อน +2

      that's one lucky manager ... he can now go and how a competent engineer!

  • @Daniel-wt9bh
    @Daniel-wt9bh 2 ปีที่แล้ว

    One of the reasons I don't go this way is because there is no way to write a composite key with Spring Data JDBC. I would have to write the queries myself which removes the default repo functionality that is included.

    • @hardcorecode
      @hardcorecode 9 หลายเดือนก่อน

      @concernedcitizen1729 how does this make it a key? Could you give a link to an example. This is the biggest downside of Spring Data JDBC

  • @mdebruijn
    @mdebruijn 3 ปีที่แล้ว +6

    Nice presentation. Next time please ignore the Slack messages during the presentation.

  • @rishabhkandari1169
    @rishabhkandari1169 2 ปีที่แล้ว

    Can any one help me how to achieve advance search using spring data jdbc in JPA we can use criteria api and specification but in Spring data JDBC we cannot use them so how to do or create advance search

  • @calofiremil7863
    @calofiremil7863 2 ปีที่แล้ว

    how is this simpler? why use a reference (another thing to learn) when you can use a string parent id?

  • @sudoaptinstallbuoncuoi
    @sudoaptinstallbuoncuoi 4 หลายเดือนก่อน

    29:42

  • @dimitrijeglisic6111
    @dimitrijeglisic6111 ปีที่แล้ว

    spring data jdbc > spring data jpa

    • @hardcorecode
      @hardcorecode 9 หลายเดือนก่อน

      Why ? because it has a lower learning curve as a result of less features? how is that a good thing?