This sample shows how to generate and interact with JSON Relational Duality Views (JDVs) directly from familiar Spring Data JPA entities. It demonstrates:
What this sample demonstrates
JSON
Document-shaped data and SQL/JSON querying inside Oracle AI Database.
Use when records need flexible structure without leaving SQL, indexes, constraints, and transactions.
Duality Views
Document-shaped access over relational tables using JSON Relational Duality Views.
Use when APIs need JSON documents without giving up relational storage, SQL, constraints, and transactions.
Testcontainers
Disposable Oracle AI Database Free containers for repeatable local and integration tests.
Use when tests need real database behavior without sharing a long-lived development instance.
Spring
Runnable Spring behavior on Oracle AI Database.
Use when Spring needs to be tested against real database behavior.
Highlights
- Annotating entities with @JsonRelationalDualityView to let Oracle AI Database generate bidirectional JSON documents over relational tables.
- Using the Oracle JSON-B binding (JSONB) to persist and retrieve strongly typed entities via JDVs.
- Bootstrapping schema and duality view lifecycle through Spring Boot configuration.
- Exercising CRUD-style flows with integration tests powered by Testcontainers and Oracle AI Database Free.