Data & Persistence
Talk to databases without the boilerplate.
Give BookVault a real database. Spring Data JPA repositories, query methods, paging and projections, transactions that keep data consistent, relationships and the N+1 problem, schema migrations, and caching.
Lessons in this stage
- 01
Spring Data JPA & Repositories
IntermediateMap objects to tables with JPA entities, and get CRUD for free from a repository interface you never implement.
18 min - 02
Queries: Derived, JPQL & Native
IntermediateQuery methods generated from their names, custom @Query in JPQL, and native SQL when you need it.
16 min - 03
Paging, Sorting & Projections
IntermediateReturn one page at a time with Pageable, sort results, and fetch only the columns you need with projections.
14 min - 04
Transactions with @Transactional
AdvancedMake multi-step changes all-or-nothing, understand propagation and rollback, and avoid the common pitfalls.
18 min - 05
Relationships & the N+1 Problem
AdvancedModel @OneToMany/@ManyToOne, understand lazy vs eager loading, and slay the notorious N+1 query problem.
18 min - 06
Database Migrations with Flyway
IntermediateVersion your schema in checked-in SQL so every environment and teammate gets the same database, reproducibly.
14 min - 07
Caching & Beyond JPA
IntermediateSpring's caching abstraction with @Cacheable, plus when to reach for JdbcClient, MongoDB, or Redis.
14 min
Ready to test yourself?
Take the stage assessment to check your mastery. Pass it to earn a stage badge toward your Javaneer certificate.