Spring Data JDBC: Beyond the Obvious

  Рет қаралды 16,769

SpringDeveloper

SpringDeveloper

2 жыл бұрын

Spring Data JDBC is an ORM inspired by Domain Driven Design. It purposely limits the ways you can model your domain objects. This makes Spring Data JDBC simple to maintain and to use.
Sometimes, though, you want to achieve things that aren’t obvious how to do. This talk shows how to solve common challenges:
- Bidirectional relationships
- ID generation
- Contextual query strategies
- Fine-tuning of mappings
Whether you are new to Spring Data JDBC or have substantial experience with it, this talk can give you a better understanding.
Jens Schauder, Staff Engineer at VMware
Slides: www.slideshare.net/Pivotal/sp...

Пікірлер: 25
@omkar.at.office
@omkar.at.office Жыл бұрын
Awesome session! Thanks.
@ivansimic3817
@ivansimic3817 2 жыл бұрын
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 Жыл бұрын
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.
@macctosh
@macctosh 2 ай бұрын
learn your tool before using it. Why do you think spring data jpa is so popular?
@praveens2272
@praveens2272 2 ай бұрын
@@macctosh if you want to drive your database from code then jpa is best. But what about existing database with complex relations between tables.
@macctosh
@macctosh 2 ай бұрын
@@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!
@mdebruijn
@mdebruijn 2 жыл бұрын
Nice presentation. Next time please ignore the Slack messages during the presentation.
@MORETHANOVERGROWN
@MORETHANOVERGROWN 2 жыл бұрын
Is there any validation performed on the database schema like is done by Hibernate on startup with spring data jpa?
@tejap463
@tejap463 2 жыл бұрын
Great talk, wish you could have explained more on why we should we use spring data jdbc instead of spring data jpa.
@pkphilips2
@pkphilips2 Жыл бұрын
The primary benefit is that Spring JDBC allows much greater control over the data fetching, caching etc than JPA
@user-sy4mp8hq6i
@user-sy4mp8hq6i Жыл бұрын
@@pkphilips2 Isn't JPA also allows greater control over the data fetching since it allows writing native queries? Or am I wrong?
@pkphilips2
@pkphilips2 Жыл бұрын
@@user-sy4mp8hq6i 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
@user-sy4mp8hq6i
@user-sy4mp8hq6i Жыл бұрын
@Prem Kurian Philip Oh I see, understood. Thank you
@manideepkumar959
@manideepkumar959 Жыл бұрын
Hi jen, when to for data jdbc over plain jdbc, what are the main advantages?
@yt-1337
@yt-1337 7 ай бұрын
plain jdbc doesnt have repositories and all the convenience features, same like jpa/hibernate vs data jpa, spring data is much easier
@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.
@concernedcitizen1729
@concernedcitizen1729 Жыл бұрын
You can define composite keys by representing the key in a composite class marked as @Embeddable. Every column in your composite key becomes a field in the embeddable class.
@macctosh
@macctosh 2 ай бұрын
@@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
@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
@alexandru-mihailadam8798
@alexandru-mihailadam8798 Жыл бұрын
JOOQ ?
@calofiremil7863
@calofiremil7863 Жыл бұрын
how is this simpler? why use a reference (another thing to learn) when you can use a string parent id?
@praveens2272
@praveens2272 Жыл бұрын
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.
@macctosh
@macctosh 2 ай бұрын
that's one lucky manager ... he can now go and how a competent engineer!
@dimitrijeglisic6111
@dimitrijeglisic6111 Жыл бұрын
spring data jdbc > spring data jpa
@macctosh
@macctosh 2 ай бұрын
Why ? because it has a lower learning curve as a result of less features? how is that a good thing?
A Spring Data’s Guide to Persistence
53:55
SpringDeveloper
Рет қаралды 13 М.
Domain-Driven Design with Relational Databases Using Spring Data JDBC
1:10:30
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 19 МЛН
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 42 МЛН
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 3,2 МЛН
IS THIS REAL FOOD OR NOT?🤔 PIKACHU AND SONIC CONFUSE THE CAT! 😺🍫
00:41
Spring Tips: Spring Data JDBC
27:36
SpringDeveloper
Рет қаралды 17 М.
The New Kid on the Block: Spring Data JDBC
1:04:53
SpringDeveloper
Рет қаралды 27 М.
Building Fast and Scalable Persistence Layers with Spring Data JPA
54:51
Spring Tips: Spring Modulith
37:39
SpringDeveloper
Рет қаралды 6 М.
Full-Stack Development with Spring Boot and VueJS
45:58
SpringDeveloper
Рет қаралды 12 М.
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes
56:08
Spring Security 5.5 From Taxi to Takeoff
51:06
SpringDeveloper
Рет қаралды 11 М.
Going Serverless Using the Spring Framework Ecosystem
54:55
SpringDeveloper
Рет қаралды 4,1 М.
сюрприз
1:00
Capex0
Рет қаралды 1,5 МЛН
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 44 МЛН
📦Он вам не медведь! Обзор FlyingBear S1
18:26
Мечта Каждого Геймера
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 2,5 МЛН