CockroachDB and Spring tutorials for Spring Data JDBC, JPA, and MyBatis

CockroachDB and Spring tutorials for Spring Data JDBC, JPA, and MyBatis

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.

CockroachDB and Spring Data JDBC 

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 → 

CockroachDB and Spring Data JPA

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. 

Read the CockroachDB and Spring Data JPA tutorial → 

CockroachDB, Spring, and MyBatis

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 → 

Keep Reading

Tutorial: Build an app with Spring, Java, Hibernate, Gradle, and CockroachDB

Application development frameworks like SpringBoot have done a good job a giving developers a  …

Read more
Build a Python app with SQLAlchemy + CockroachDB

One of the great things about CockroachDB’s support for SQL is the ecosystem of frameworks, ORMs, and …

Read more
Build a Java app with CockroachDB and jOOQ

We’re excited to announce that the latest release of jOOQ supports CockroachDB. 

jOOQ is a …

Read more