From our enterprise customers to developer shops, a lot of folks use CockroachDB to back their Spring applications. It’s no surprise; Java is the most widely used programming language in the world, running in over 3 billion devices. And no matter what kind of application you’re running, the Spring ecosystem provides different data access patterns depending on your needs.
We’ve recently added tutorials for a number of Spring data access patterns: Spring Data JDBC, Spring Data JPA, and MyBatis. Check them out below.
Spring Data JDBC is a framework that lets developers easily implement applications on top of the Java Database Connectivity (JDBC) API. Compared to an ORM or other tools, JDBC is a low-level way to access data where you’re writing raw SQL commands. Since CockroachDB is Postgres wire compatible, we use the Postgres flavor of JDBC (also known as PgJDBC).
Read the CockroachDB and Spring Data JDBC Tutorial →
Spring Data JPA provides support for creating Java Persistence API (JPA) repositories by extending the Spring Data repository interface. This handles support for JPA-based data access layers, making it much easier to build Spring-powered applications that use data access technologies.
MyBatis is an open-source, lightweight data access framework on top of the JDBC Postgres driver. Compared to other persistence frameworks, MyBatis emphasizes the use of SQL. It executes the SQL you write and converts it to object representations in Java.
Read the CockroachDB and MyBatis tutorial →
Application development frameworks like SpringBoot have done a good job a giving developers a …Read More