In this workshop, we'll learn SQL fundamentals and how to use the Java Persistence API (JPA) to interact with a PostgreSQL database from a Spring Boot application. We'll be working with PostgreSQL — an open source database server pre-loaded with movie data.
The first part focuses on learning SQL through hands-on exercises. The second part introduces JPA and Spring Data to query the same database from a Java web application.
- Docker Desktop
- IntelliJ Community Edition
- JDK Development Kit (JDK 17 or later): Java SE Development Kit
- Alternative dev kit (Java 17 or later): Eclipse Temurin Java Development Kit
- Maven (for the JPA exercises)
- A terminal / command line
- A code editor or IDE (IntelliJ recommended)
- Start by cloning this repository to a directory on your computer.
- Although you have this README file open, we recommend reading the exercises on GitHub for the best formatting experience.
- Exercise 1 - Getting Started
- Exercise 2 - Basic SQL Queries
- Exercise 3 - Modifying Data
- Exercise 4 - Pattern Matching and Sorting
- Exercise 5 - Joining Tables
- Exercise 6 - Querying Movies with JPA
- Exercise 7 - Movie Details and Relationships
- Exercise 8 - Directors
✏️ - A task you should do
📖 - A section of text to read (no tasks, just information).
💡 - Additional information.
❗ - Something important.
❓ - Open-ended question for the reader
💩 - Bad practice (don't-do-this)
⭐ - A bonus task (not required)
F5 - Run query in pgAdmin