Skip to content

Module 16 · Working with Databases

Beyond the 1Z0-830 exam

The exam doesn't cover JDBC or databases, but almost every real Java application talks to one — and testing against data is a core SDET skill. This module covers JDBC, transactions, and how to test against real and in-memory databases.

Accessing and testing against relational data: JDBC fundamentals, transactions and pooling, choosing a test database (H2 vs Testcontainers), and writing reliable database tests.

Lab policy

This module's lab runs JDBC against in-memory H2 — pure Java, no Docker — so it stays green in the default mvn -f labs/pom.xml test. The Testcontainers approach (L03) needs Docker and is illustrative only, kept out of the default run (Part B lab policy).

Lessons

#LessonWhat it covers
01JDBC CoreConnection, PreparedStatement vs Statement, ResultSet, injection.
02Transactions & PoolingCommit/rollback, isolation levels, connection pools.
03Test DatabasesIn-memory H2, Testcontainers for real engines, schema/seed.
04Database Testing & AssertionsSetup/teardown, verifying DB state, idempotent tests.

Module Mini-Exam

A mixed quiz over this module. Since this is beyond-exam material, treat it as a self-check rather than exam simulation.

Mini-Exam

  • 7 questions
  • 12 minutes
  • 7 total points
  • Pass: 5 pts (68%)