This sample demonstrates how to use multivalue function-based indexes for JSON array lookups in Oracle AI Database. It stores product documents in a native `JSON` column, creates multiple targeted indexes over array-backed paths, and queries each path with a matching `json_exists` predicate.
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.
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.
Highlights
- Store inventory products as JSON documents in a native Oracle AI Database JSON column.
- Create a numeric multivalue index over scalar values inside the compatiblePartIds array.
- Create a string multivalue index over region values inside an array of warehouse objects.
- Create a composite multivalue index over type and partId values inside the same component object array.