The Marco Show

Hibernate vs Spring Data vs jOOQ: Understanding Java Persistence | Thorben Janssen

The Marco Show

Show Notes

Thorben Janssen joins Marco to talk about the hidden power (and pain) of Java persistence frameworks. Hibernate, JPA, Spring Data, jOOQ: which one should you really use in 2025? From learning SQL the right way to surviving microservices madness, this episode is packed with hard-won lessons from decades of real-world Java work. 💡 Topics in this episode: Hibernate vs JPA vs Jakarta Data When to use jOOQ or Exposed The biggest persistence misconceptions Common performance traps (and how to avoid them) Monoliths, microservices, and “real” architecture decisions How AI might change the way we write queries

⏱️ Timestamps: (00:00) Introduction: From painful early learning to AI-generated annotations (01:02) Meet Thorben Janssen – consultant and trainer for Java persistence (02:11) Early days of Hibernate and the horror of EJB2 (04:33) Main challenges in database access today (06:18) Too many tools: Hibernate, JPA, Spring Data, jOOQ – how to choose (08:15) Why understanding ORM internals really matters (09:20) How juniors should start learning persistence (10:59) SQL skills – why you still need them even with Hibernate or Spring Data (13:48) SQL essentials for beginners: what to learn first (16:01) Why Hibernate became the dominant persistence tool (18:57) Hibernate vs JPA – is there really a difference? (20:35) Hibernate API vs Jakarta Persistence API – which to use (22:10) Criteria API and DSLs for queries (23:43) Strengths and weaknesses of Spring Data JPA (27:26) Jakarta Data vs Spring Data JPA (30:53) Stateful vs stateless data models (33:21) jOOQ, Exposed, and the SQL-centric approach (37:41) Mixing Hibernate and Exposed in one project (39:33) Where Spring Data JDBC fits in (43:24) Starting a new project in 2025 – what stack to choose (45:24) The role of experience and not chasing every new trend (48:50) Monoliths, microservices, and common pitfalls (52:14) Database design vs service design – where to start (59:02) Common database performance issues (01:03:10) Why developers should collaborate with DBAs (01:06:20) Caching problems: when caches make things worse (01:09:29) Reactive database access – what happened to the hype (01:12:33) The "perfect" persistence framework – does it exist? (01:14:40) AI-assisted development and query generation (01:19:43) The AI hype cycle and developer reality (01:20:17) Other persistence models worth learning (graph, full-text search) (01:21:43) Full-text search and graph databases in practice (01:23:25) Integrating AI into applications (01:24:38) Thorben's unpopular opinions (01:26:04) Giveaway announcement (01:27:06) Rapid-fire round: Paderborn, joins, and lazy loading (01:30:00) Closing remarks

🎁 Giveaway: What’s the highest number of SQL queries you’ve ever seen one workflow generate? Best answers win JetBrains merch or IDE licenses. New episodes every other Wednesday. Subscribe for deep, developer-focused conversations.📺 Watch on YouTube: https://youtu.be/t4h6l-HlMJ8

More from The Marco Show

Sep 2, 2026

Michael Simons, a longtime Java developer and Neo4j engineer, joins Marco to talk about the engineering principles that have stayed relevant across decades of changing technologies. The conversation covers database-first thinking, Spring and the Java ecosystem, graph databases, developer tooling, and why pragmatic decisions often matter more than chasing the “best” framework. They also discuss how AI is changing software development, where AI tools genuinely help, and why human judgment and responsibility still matter. 💡 In this episode: Why Michael still starts with the data model when building applications

Aug 19, 2026

Venkat Subramaniam joins Marco to talk about what AI is really changing for developers. They discuss why AI often impresses novices more than experts, why “AI first” is the wrong mindset, and why critical thinking, fundamentals, and judgment matter more than ever. 💡 In this episode: Why AI is better at finding problems than writing code

Aug 5, 2026

Sébastien Deleuze, a longtime Spring Framework committer and member of the Spring AI team, joins Marco to talk about how 13 years on the Spring team shaped his pragmatic approach to software development. The conversation covers how Spring AI fits into the Spring ecosystem, why enterprise AI still needs deterministic workflows and human accountability, and why long-term software quality matters even as GenAI changes how code gets written. 💡 In this episode: How Sébastien joined the Spring team through open source contributions

Jul 22, 2026

Josh Long, Spring Developer Advocate at Broadcom, joins Marco to cover 25 years of Spring history and what the JVM's real shot at the AI era actually looks like. Josh has published a weekly blog since 2011 and a weekly podcast since 2018 without missing an episode. This conversation gets into why vibe coding concerns him as an engineer, what accountability for AI-generated code actually means, and why Python's dominance in AI is more a marketing gap than a technical one. 💡 In this episode: Spring's origin story: why the documentation came before the code

Jul 8, 2026

Martin Lippert, longtime maintainer of Spring Tools and one of the people who has witnessed developer tooling evolve from Eclipse to VS Code, joins Marco to discuss how AI is transforming Java development, and what that means for the future of software engineering. ⏱️ Timestamps: (00:00) Teaser(00:38) Meet Martin Lippert, Spring Tools & the evolution of Java IDEs(03:28) What happened to Eclipse? Lessons from the rise and fall of a Java giant(12:20) Why Spring Tools moved to VS Code and embraced the Language Server Protocol(20:03) How AI is changing Java development and everyday coding workflows(21:59) Martin's AI workflow: Cursor, IDEs, code review & testing(26:16) Building developer tools for AI agents instead of humans(31:10) Why AI is changing release cycles and developer tooling(36:03) AI review fatigue, cognitive depth & trusting generated code(39:06) Will AI replace senior developers? What happens to junior engineers?(42:16) The future of Java, Spring & software architecture in an AI-first world(48:42) AI's hidden energy problem and the sustainability challenge(54:39) Practical tips for greener software engineering and AI usage(1:00:06) Giveaway & rapid-fire questions

See all episodes →