SlideShare a Scribd company logo
11
Most read
12
Most read
19
Most read
Confidential │ ©2021 VMware, Inc.
Spring Data JDBC
Beyond the Obvious
Jens Schauder (he/him)
Spring Data
Year 2 of the Pandemic
Confidential │ ©2021 VMware, Inc. 2
This presentation may contain product features or functionality that are currently under
development.
This overview of new technology represents no commitment from VMware to deliver these
features in any generally available product.
Features are subject to change, and must not be included in contracts, purchase orders, or
sales agreements of any kind.
Technical feasibility and market demand will affect final delivery.
Pricing and packaging for any new features/functionality/technology discussed or
presented, have not been determined.
The information in this presentation is for informational purposes only and may not be incorporated into any contract. There is no
commitment or obligation to deliver any items presented herein.
Disclaimer
Confidential │ ©2021 VMware, Inc.
Spring Data JDBC
Confidential │ ©2021 VMware, Inc. 4
Spring Data
Confidential │ ©2021 VMware, Inc. 5
Relational Databases
Confidential │ ©2021 VMware, Inc. 6
Strong Aggregates
Confidential │ ©2021 VMware, Inc.
Challenges
Confidential │ ©2021 VMware, Inc. 8
User Defined IDs
Confidential │ ©2021 VMware, Inc. 9
User Defined IDs
Use
• JdbcAggregateTemplate.insert
• Or a BeforeSaveCallback
Confidential │ ©2021 VMware, Inc. 10
JSON / Custom Conversions
Confidential │ ©2021 VMware, Inc. 11
JSON / Custom Conversions
• Use a custom type
• Register custom converters
• Don’t forget @ReadingConverter /
@WritingConverter
Confidential │ ©2021 VMware, Inc. 12
Bidirectional Relationships
Confidential │ ©2021 VMware, Inc. 13
Bidirectional Relationships (internal)
Set the backreference whenever adding an
inner entity.
Confidential │ ©2021 VMware, Inc. 14
Bidirectional Relationships (external)
Use a custom query on the repository.
Confidential │ ©2021 VMware, Inc. 15
Caching
Confidential │ ©2021 VMware, Inc. 16
Caching
Use Springs existing caching abstraction on
the repository.
Confidential │ ©2021 VMware, Inc. 17
Eager Loading References
Confidential │ ©2021 VMware, Inc. 18
Eager Loading References
Create an entity defining the required
combination of aggregates (or their pieces)
Use a dedicated repository or custom
queries to load it.
You may want to “persist” the query as a
database view.
Confidential │ ©2021 VMware, Inc. 19
Resources
Source: https://github.com/schauder/talk-beyond
SD JDBC: https://github.com/spring-projects/spring-data-jdbc
Required Reading:https://spring.io/blog/2018/09/24/spring-data-
jdbc-references-and-aggregates
SO: https://stackoverflow.com/questions/tagged/spring-data-jdbc
Twitter: https://twitter.com/jensschauder
Confidential │ ©2021 VMware, Inc. 20
Questions?

More Related Content

PDF
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
PPTX
Apache Airflow overview
PPTX
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
PPT
Spring Boot in Action
PPTX
Spring Cloud Config
PPTX
Spring boot
PPTX
Springboot Microservices
PDF
S13 Oracle Database を Microsoft Azure 上で運用する為に~基本事項とベストプラクティス
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
Apache Airflow overview
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Spring Boot in Action
Spring Cloud Config
Spring boot
Springboot Microservices
S13 Oracle Database を Microsoft Azure 上で運用する為に~基本事項とベストプラクティス

What's hot (20)

PPTX
Oracleからamazon auroraへの移行にむけて
PPTX
Introduction to Spring Boot
PDF
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
PPTX
Apache airflow
PDF
Spring Boot & Actuators
PPTX
Azure Key Vault - Getting Started
PDF
Introduction to Docker Compose
PDF
20200728 AWS Black Belt Online Seminar What's New in Serverless
PPT
Spring Core
PDF
20190514 AWS Black Belt Online Seminar Amazon API Gateway
PDF
Airflow introduction
PDF
Spring Boot on Amazon Web Services with Spring Cloud AWS
PDF
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
PDF
最適なOpenJDKディストリビューションの選び方 #codetokyo19B3 #ccc_l5
PDF
Airflow Intro-1.pdf
PDF
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
PDF
Airflow 2.0 migration ガイド
PPTX
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
PDF
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
Oracleからamazon auroraへの移行にむけて
Introduction to Spring Boot
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Apache airflow
Spring Boot & Actuators
Azure Key Vault - Getting Started
Introduction to Docker Compose
20200728 AWS Black Belt Online Seminar What's New in Serverless
Spring Core
20190514 AWS Black Belt Online Seminar Amazon API Gateway
Airflow introduction
Spring Boot on Amazon Web Services with Spring Cloud AWS
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
最適なOpenJDKディストリビューションの選び方 #codetokyo19B3 #ccc_l5
Airflow Intro-1.pdf
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
Airflow 2.0 migration ガイド
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
Ad

Similar to Spring Data JDBC: Beyond the Obvious (20)

PPTX
Big MDM Part 2: Using a Graph Database for MDM and Relationship Management
PPTX
Demystfying nosql databases
PPTX
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
PDF
What Is Spring?
PDF
Hpts 2011 flexible_oltp
PDF
Full Steam Ahead, R2DBC!
PPTX
The Evolution of the Oracle Database - Then, Now and Later (Fontys Hogeschool...
PPT
Java Developers, make the database work for you (NLJUG JFall 2010)
PDF
Are You Prepared For The Future Of Data Technologies?
DOC
Java database programming with jdbc
PDF
Re-inventing the Database: What to Keep and What to Throw Away
PDF
II-SDV 2013 Open Source Platforms to deploy Search and Maps Visualization on ...
PPTX
Fontys Lecture - The Evolution of the Oracle Database 2016
PPTX
Oracle OpenWo2014 review part 03 three_paa_s_database
PPTX
Big data hadoop-no sql and graph db-final
PPTX
Piranha vs. mammoth predator appliances that chew up big data
PPT
Giga Spaces Data Grid / Data Caching Overview
PPT
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
PPTX
Big Data 2.0 - Milwaukee Big Data User Group Presentation
PDF
Forecast of Big Data Trends
Big MDM Part 2: Using a Graph Database for MDM and Relationship Management
Demystfying nosql databases
Big Data Management System: Smart SQL Processing Across Hadoop and your Data ...
What Is Spring?
Hpts 2011 flexible_oltp
Full Steam Ahead, R2DBC!
The Evolution of the Oracle Database - Then, Now and Later (Fontys Hogeschool...
Java Developers, make the database work for you (NLJUG JFall 2010)
Are You Prepared For The Future Of Data Technologies?
Java database programming with jdbc
Re-inventing the Database: What to Keep and What to Throw Away
II-SDV 2013 Open Source Platforms to deploy Search and Maps Visualization on ...
Fontys Lecture - The Evolution of the Oracle Database 2016
Oracle OpenWo2014 review part 03 three_paa_s_database
Big data hadoop-no sql and graph db-final
Piranha vs. mammoth predator appliances that chew up big data
Giga Spaces Data Grid / Data Caching Overview
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
Big Data 2.0 - Milwaukee Big Data User Group Presentation
Forecast of Big Data Trends
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
PDF
What AI Means For Your Product Strategy And What To Do About It
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
PPTX
Enhancing DevEx and Simplifying Operations at Scale
PDF
Spring Update | July 2023
PPTX
Platforms, Platform Engineering, & Platform as a Product
PPTX
Building Cloud Ready Apps
PDF
Spring Boot 3 And Beyond
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
PPTX
tanzu_developer_connect.pptx
PDF
Tanzu Virtual Developer Connect Workshop - French
PDF
Tanzu Developer Connect Workshop - English
PDF
Virtual Developer Connect Workshop - English
PDF
Tanzu Developer Connect - French
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
PDF
SpringOne Tour: The Influential Software Engineer
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
Spring into AI presented by Dan Vega 5/14
What AI Means For Your Product Strategy And What To Do About It
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Enhancing DevEx and Simplifying Operations at Scale
Spring Update | July 2023
Platforms, Platform Engineering, & Platform as a Product
Building Cloud Ready Apps
Spring Boot 3 And Beyond
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
tanzu_developer_connect.pptx
Tanzu Virtual Developer Connect Workshop - French
Tanzu Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
Tanzu Developer Connect - French
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: Domain-Driven Design: Theory vs Practice

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
AI in Product Development-omnex systems
PDF
System and Network Administraation Chapter 3
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Online Work Permit System for Fast Permit Processing
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Digital Strategies for Manufacturing Companies
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
DOCX
Looking for a Tableau Alternative Try Helical Insight Open Source BI Platform...
PDF
5 Lead Qualification Frameworks Every Sales Team Should Use
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
AI in Product Development-omnex systems
System and Network Administraation Chapter 3
Essential Infomation Tech presentation.pptx
Online Work Permit System for Fast Permit Processing
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Digital Strategies for Manufacturing Companies
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
Softaken Excel to vCard Converter Software.pdf
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Which alternative to Crystal Reports is best for small or large businesses.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Looking for a Tableau Alternative Try Helical Insight Open Source BI Platform...
5 Lead Qualification Frameworks Every Sales Team Should Use
VVF-Customer-Presentation2025-Ver1.9.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
How to Migrate SBCGlobal Email to Yahoo Easily

Spring Data JDBC: Beyond the Obvious

  • 1. Confidential │ ©2021 VMware, Inc. Spring Data JDBC Beyond the Obvious Jens Schauder (he/him) Spring Data Year 2 of the Pandemic
  • 2. Confidential │ ©2021 VMware, Inc. 2 This presentation may contain product features or functionality that are currently under development. This overview of new technology represents no commitment from VMware to deliver these features in any generally available product. Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind. Technical feasibility and market demand will affect final delivery. Pricing and packaging for any new features/functionality/technology discussed or presented, have not been determined. The information in this presentation is for informational purposes only and may not be incorporated into any contract. There is no commitment or obligation to deliver any items presented herein. Disclaimer
  • 3. Confidential │ ©2021 VMware, Inc. Spring Data JDBC
  • 4. Confidential │ ©2021 VMware, Inc. 4 Spring Data
  • 5. Confidential │ ©2021 VMware, Inc. 5 Relational Databases
  • 6. Confidential │ ©2021 VMware, Inc. 6 Strong Aggregates
  • 7. Confidential │ ©2021 VMware, Inc. Challenges
  • 8. Confidential │ ©2021 VMware, Inc. 8 User Defined IDs
  • 9. Confidential │ ©2021 VMware, Inc. 9 User Defined IDs Use • JdbcAggregateTemplate.insert • Or a BeforeSaveCallback
  • 10. Confidential │ ©2021 VMware, Inc. 10 JSON / Custom Conversions
  • 11. Confidential │ ©2021 VMware, Inc. 11 JSON / Custom Conversions • Use a custom type • Register custom converters • Don’t forget @ReadingConverter / @WritingConverter
  • 12. Confidential │ ©2021 VMware, Inc. 12 Bidirectional Relationships
  • 13. Confidential │ ©2021 VMware, Inc. 13 Bidirectional Relationships (internal) Set the backreference whenever adding an inner entity.
  • 14. Confidential │ ©2021 VMware, Inc. 14 Bidirectional Relationships (external) Use a custom query on the repository.
  • 15. Confidential │ ©2021 VMware, Inc. 15 Caching
  • 16. Confidential │ ©2021 VMware, Inc. 16 Caching Use Springs existing caching abstraction on the repository.
  • 17. Confidential │ ©2021 VMware, Inc. 17 Eager Loading References
  • 18. Confidential │ ©2021 VMware, Inc. 18 Eager Loading References Create an entity defining the required combination of aggregates (or their pieces) Use a dedicated repository or custom queries to load it. You may want to “persist” the query as a database view.
  • 19. Confidential │ ©2021 VMware, Inc. 19 Resources Source: https://github.com/schauder/talk-beyond SD JDBC: https://github.com/spring-projects/spring-data-jdbc Required Reading:https://spring.io/blog/2018/09/24/spring-data- jdbc-references-and-aggregates SO: https://stackoverflow.com/questions/tagged/spring-data-jdbc Twitter: https://twitter.com/jensschauder
  • 20. Confidential │ ©2021 VMware, Inc. 20 Questions?