Spring Data
Table of Contents
Documentation: https://spring.io/projects/spring-data
Tags
Stack | JDBC to Spring Data JDBC | R2DBC to Spring Data R2DBC | JDBC to Spring Data JPA |
---|---|---|---|
Underlying API | JDBC | R2DBC | JDBC |
Usability Layer | Spring JDBC | Spring R2DBC | Spring ORM (*) |
ORM | Spring Data JDBC | Spring Data R2DBC | JPA |
Repository Abstraction | Spring Data JDBC | Spring Data R2DBC | Spring Data JPA |
Communication Style | synchronous | reactive | synchronous |
R2DBC is an alternative to JDBC. It is reactive, i.e. non-blocking. You send a statement to the server, continue to work and eventually receive the results as an event. It is often used for the ability to better scale. But using it is more complex because it is asynchronous and basically your complete application should be too in order to get the benefits. As with JDBC you probably don’t want to use it on its own.