Skip to main content

Section 13 · Stage 4: Build Applications

JDBC & Database Connectivity

Set up Maven projects and connect Java to a database with JDBC: queries, prepared statements, transactions and the DAO pattern.

What you will be able to do

  • Create and run a Maven project and add libraries as dependencies
  • Connect a Java program to MySQL and run queries with JDBC
  • Prevent SQL injection with prepared statements
  • Manage transactions and close resources correctly from Java
  • Organise database code with the DAO pattern and a connection pool
  • Build a console version of ShopLite on top of the SQL schema

What you will learn

  1. 13.1Maven Projects & Dependencies9 lessons
  2. 13.2Connecting to a Database7 lessons
  3. 13.3Running Queries with JDBC7 lessons
  4. 13.4Prepared Statements & SQL Injection7 lessons
  5. 13.5Resource Handling & SQL Errors6 lessons
  6. 13.6Transactions in JDBC7 lessons
  7. 13.7The DAO Pattern8 lessons
  8. 13.8Connection Pooling & Configuration7 lessons
  9. 13.9JDBC Mini Project: ShopLite Console App5 lessons