
Learn to access several relational databases with Quarkus, map objects using JPA Panache, and expose data via rest endpoints and HTML while using various Quarkus profiles.
Explore three Quarkus apps with MySQL, MariaDB, and PostgreSQL, mapping POJOs and JPA entities with Panache, modeling books, CDs, artists, and orders, plus REST endpoints and dockerized development.
Watch a demo of a vintage store app built with quarkus, exposing APIs for artists, customers, books, and cds backed by postgres; explore json and html views with panache queries.
Continue building the final application by adding code and ensuring tests pass, while the next lesson defines object-relational mapping, its history, and how JDBC, JPA, Panache, and Quarkus fit together.
Discover how relational databases store data in tables with primary and foreign keys, and how Quarkus uses JDBC, JPA, Hibernate, and Panache to map objects and perform CRUD.
Explore how to bootstrap three quarkus applications with the maven plugin, showcasing object-relational mapping and different databases, including PostgreSQL, MySQL, and MariaDB.
Verify your development environment by installing Java 11, choosing an IDE, and ensuring Maven, Docker, and curl are ready for Quarkus dev services with relational databases.
Bootstrap three Quarkus applications by generating a multi-module project with artist, customer, and vintage store, configure a parent pom, and streamline structure by removing docker and extraneous files.
Model the artist pojo, customer entity, and publisher entity; persist and query them with jdbc, jpa, and panache across different databases, using PostgreSQL, then compare pojo jpa and panache entities.
Model and query persistence objects across three projects in Quarkus, including a pojo artist on MySQL, a Jpa customer on MariaDB, and a Panache publisher on PostgreSQL.
Create an artist plain old Java object, use a CDI repository with a data source, and implement SQL-based persist and find-by-id tests in Quarkus.
Model a customer as a JPA entity with a persistent identity and map it to a table using annotations, managed by the entity manager for easy persist and find operations.
Model the customer as a JPA entity with a generated id, implement a repository, and use the entity manager for persist and find by id, enabling database creation and tests.
Model a publisher as a Panache entity backed by JPA annotations, with public attributes and an automatically generated ID from the superclass, enabling built-in CRUD and query operations in PostgreSQL.
Compare jdbc, jpa, and panache in Quarkus, highlighting how each integrates with entities and repositories. See how panache simplifies pojos and tests with dev services and test containers.
Explore how the JPA entity manager orchestrates entity state and lifecycle, enabling persist, remove, find by ID, locking, and query creation; learn how Panache abstracts it for Quarkus apps.
Panache provides two ways to access entities; the active record pattern embeds CRUD methods in the entity by extending Panache entity base, with operations backed by the JPA entity manager.
Install the artist jar with a Maven clean install, add a dependency in pom.xml excluding MySQL, and implement a Panache artist repository as JPA entity for t_artists with transactional tests.
Transform a pojo into a panache entity and manage a customer jpa entity with a repository, using a panache archive marker for entities in separate jars.
Explore Quarkus with Panache to map artists, customers, and publishers using annotations and XML, then inherit from Item to books and CDs and define relationships.
Explore object-relational mapping, translating Java objects to sql, map entities to tables and attributes to columns, including mapping to existing tables via annotations or xml.
Customize mapping with annotations or XML to redefine the database structure for panache and JPA entities. Annotate entities, attributes, and relationships to set table names and column details.
Customize mapping with xml to adapt an external pojo, adjust ddl via orm xml, change column lengths, extend bio to 3000, and set created_date as non-null.
Explore mapping inheritance in Quarkus by enriching a model with item, book, and CD entities, customizing fields like title, description, price, created_date, and language enum as string.
Map purchase orders to customers and order lines using JPA relationship annotations in Quarkus, with join column or join table and cascade persist and remove.
Explore querying relational data in Quarkus, using Panache's default queries and custom queries with active record and repository patterns, then add data to test 1-to-1, 1-to-many, and many-to-one relationships.
Learn to query existing entities in relational databases with Quarkus by adding repository queries, building on a complete business model, without creating new entities.
Explore SQL, JPQL, and Panache query languages to query relational data as entities and attributes, using the entity manager and APIs to build dynamic, typed, and native queries.
Explore default panache queries from repository and active record bases to count, list, find by id, delete all, and stream entities, with optional results and SQL insight.
Use default Panache queries to count, list all, persist, and delete artists via repository and active record patterns. Enable log SQL in application properties to view generated SQL and mappings.
Learn to craft custom panache queries using JPQL or simplified JPQL, leveraging the list method, parameters, and the sort API across customer, artist, and publisher repositories.
Expose relational data via rest endpoints using jax-rs and rest-easy in quarkus, producing json with jsonb, and query /api/customers and /api/publishers using http get.
Expose relational data from a Quarkus app by creating rest endpoints for artists and publishers, loading sample data from an import sql, and enabling json responses with resteasy jackson.
Manage data consistency in quarkus by applying jta transactions for http post and delete, using transactional annotations with inherited policies, and testing with swagger ui and open api extension.
Implement transactional create and delete operations for artists and publishers in Quarkus, returning 201 with the new resource URI and enabling Swagger UI for testing.
Learn to visualize relational data with Quarkus by creating rest endpoints that render Qute templates for books and CDs, including single and list views, with dynamic IDs.
Beautify Qute templates by creating a base template with CSS, JavaScript, and a navigation bar, then include it in other templates and pass parameters, using Twitter Bootstrap.
Refactor four Qute templates into a shared base template, add a dynamic title parameter, and beautify the UI with Twitter Bootstrap's navigation bar, container layout, and table styling.
Learn to execute and test the Quarkus app in modes, switch from Postgres with dev services to H2 in memory database for testing, and deploy production with a Docker image.
Quarkus uses configuration profiles to activate environment-specific settings in application.properties file. Create custom profiles and activate them with mvn quarkus dev or mvn quarkus test, or a runnable jar.
Start dev mode to run a test container PostgreSQL via Quarkus dev services, then fix the port to 5432 in application properties for stable access.
Configure tests to run with an in-memory H2 database for speed, switching from dev services with Postgres; compare performance by enabling the Maven test profile and running tests in memory.
Run mvn test with dev services to see test containers start postgres, then speed up tests by using an in-memory h2 database and adding the h2 jdbc extension to pom.xml.
Review the progress from pojos, JPA entities to repositories, resources, and templates, and confirm test, in-memory, and PostgreSQL production databases.
Revisit the full journey of building Quarkus apps with MySQL, MariaDB, and PostgreSQL, from POJO and JDBC to JPA entity and Panache repositories.
Finish the course by bootstrapping three apps with three databases, moving from JDBC to JPA and Panache, mapping entities, inheritance, and queries, exposing data with REST and cute templates.
Take one more step in the Quarkus world by accessing external references on Quarkus, JPA, and Panache in a short, introductory lesson.
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:
o POJOs and JDBC with MySQL
o JPA Entities with MariaDB
o 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!