We introduced Spring Data in chapter 2: it’s an umbrella project containing many projects whose purpose is to simplify access to both relational and NoSQL databases by adhering to the Spring framework principles. In chapter 4, we looked in detail at the principles and capabilities of the Spring Data JPA project. The purpose of Spring Data JDBC is to efficiently deal with JDBC-based repositories. It is a younger project in the family, and it does not offer all the JPA capabilities, such as caching or lazy loading, resulting in a simpler and more limited ORM. However, it is growing and introducing new features with each version.
Why would we need Spring Data JDBC, when we already have alternatives such as JPA, Hibernate, and Spring Data JPA? The truth is that object/relational mapping (ORM) makes projects complex, and you clearly saw this in the previous chapters. There are situations when we’ll want to eliminate this complexity and take the benefits of working with Spring, the most popular Java framework today. What alternatives do we have?