Accessing Relational Databases with Quarkus
Level: Intermediate / Duration: 5h25
Description
This course is for Quarkus developers who want to discover how Quarkus handles relational databases. It’s a mixture of slides and code so you can “Understand and Practice” at the same time. This way, you learn the theory, and then put it into practice by developing an application step by step.
In this course you will develop a Quarkus applications maps and queries different kind of persistent objects to several relational databases. After introducing JDBC, JPA and Panache ORM, you will make sure your development environment is set up, and you will go from bootstrapping three Quarkus applications, developing and refactoring a rich business model, map and query these objects to a Postgres database. The different steps you’ll go through are:
- Understand JDBC, JPA and Panache ORM
- Understand SQL, JPQL and Simplified Panache JPQL
- Understand the differences between Panache Active Record and Panache Repositories
- Check your development environment
- Bootstrap three Quarkus applications:
- POJOs and JDBC with MySQL
- JPA Entities with MariaDB
- Panache ORM Entities with PostgresSQL
- Test and refactor these applications so they have dependencies between them
- Map persistent objects to a relational database (with annotations and XML)
- Map inheritance and relationships
- Query persistent objects using JPQL and Simplified Panache QL
- Expose data in JSON using REST endpoint with JAX-RS and JSON-B
- Handle transactions
- Visualise data in HTML using Qute templates and Twitter Bootstrap
- Use Quarkus profiles to switch between database
- Execute the application in dev/test/production mode thanks to DevServices and Docker
At the end of the course you’ll get a good understanding on how to develop a data centric application with Quarkus. You will be able to bootstrap, develop, package and execute an application that accesses a relational database, but most important, take Quarkus to your next project.
Good luck for the course, and please reach out if you need any help or if you have any request: I’m here to help!
Presenting "Accessing Relational Databases with Quarkus"
What you'll learn
- Understand the persistence ecosystem and how Quarkus supports it
- Bootstrap three data-centric applications with Quarkus
- Develop, configure and test each application separately using JDBC, JPA, Panache ORM, JUnit and RestAssured
- Persist objects into MySQL, MariaDB, H2 and PostgresSQL databases
- Use JPA to map persistent objects (columns, tables, inheritance, relationships)
- Use JPQL and Simplified Panache QL to query persistent objects
- Use JAX-RS and JSON-B to expose data through REST endpoints
- Use Qute templates to visualise data in HTML
- Beautify the Qute templates with Twitter Bootstrap
- Use Docker throught TestContainers and DevServices to test the application
- Build and execute the application using several Quarkus profiles
Requirements
- A recent Windows / Mac / Linux machine
- Knowledge of the Java language and the Java ecosystem (Maven, JUnit)
- Basic knowledge of Quarkus
- Basic knowledge of relational databases (SQL)
- Basic knowledge of RESTful Web Services
- Basic knowledge of HTML and CSS
- Basic knowledge of Docker
Who is this course for?
- Java developers who know Quarkus
- Quarkus developers curious about relational databases
- Back-end Java developers willing to access data in an object way
- Spring Boot or Micronaut developers wanting to compare their toolkit with Quarkus
Example Curriculum
- Lecture Overview (1:13)
- Plain Old Java Objects (9:29)
- Activity: Plain Old Java Objects (13:01)
- JPA Entities (5:22)
- Activity: JPA Entities (7:25)
- Panache Entities (3:39)
- Activity: Panache Entities (3:26)
- Comparing JDBC, JPA and Panache (2:42)
- Activity: Comparing JDBC, JPA and Panache (1:50)
- Next (1:18)
- Lecture Overview (2:11)
- JPA Entity Manager (2:09)
- Panache Active Record (2:21)
- Panache Repositories (3:09)
- Managing POJOs with Repositories (3:50)
- Activity: Managing POJOs with Repositories (5:58)
- Managing Entities with Repositories (2:40)
- Activity: Managing Entities with Repositories (4:12)
- Next (1:39)
- Lecture Overview (1:30)
- What Is Mapping? (5:08)
- Customising Mapping with Annotations (3:37)
- Activity: Customising Mapping with Annotations (4:10)
- Customising Mapping with XML (2:39)
- Activity: Customising Mapping with XML (2:14)
- Mapping Inheritance (5:24)
- Activity: Mapping Inheritance (5:19)
- Mapping Relationships (8:16)
- Activity: Mapping Relationships (12:41)
- Next (0:50)
- Lecture Overview (1:05)
- Exposing Data via REST Endpoints (6:10)
- Activity: Exposing Data via REST Endpoints (7:54)
- Handling Transactions (5:37)
- Activity: Handling Transactions (6:26)
- Visualising Data with Qute Templates (8:05)
- Activity: Visualising Data with Qute Templates (10:45)
- Beautifying Qute Templates (3:03)
- Activity: Beautifying Qute Templates (7:57)
- Mixing Qute and Panache (3:44)
- Activity: Mixing Qute and Panache (5:46)
- Next (1:05)