This project demonstrates how to use Oracle's JSON Relational Duality Views with Spring Boot and Testcontainers. It shows how to seamlessly work with both relational and JSON data in your Java applications.
JSON Relational Duality Views in Oracle Database let you work with the same data in both relational and JSON formats. This means you can:
- Store data in regular database tables
- Access and modify this data using standard SQL
- Work with the same data as JSON documents
- Keep both views automatically synchronized
- Spring Boot setup for Oracle Database connectivity
- Testcontainers configuration for reliable testing
- Example entities and repositories showing both relational and JSON operations
- Unit tests demonstrating data duality
- Testcontainers for easy database setup
- Spring Boot
- Oracle Database
- Testcontainers
- JUnit 5
- Clone the repository
- Make sure Docker is running (needed for Testcontainers)
- Run the tests with:
./mvnw test
The tests will automatically:
- Start an Oracle container
- Set up the database schema
- Create a duality view
- Load example data
- Run the example operations
For further reference, please consider the following sections:
- Overview of JSON-Relational Duality Views
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Spring Boot Testcontainers support
- Testcontainers
- Testcontainers Oracle-Free Module Reference Guide
- Flyway Migration
This project uses Testcontainers at development time.
Testcontainers has been configured to use the following Docker images: