14.9.1 Using JSON Type and Duality Views
Use JSON type and duality views to work with relational data as JSON.
Oracle
26ai's JSON type further simplifies JSON data processing in SQL and
PL/SQL. Its JSON Relational Duality Views let you define a declarative JSON structure
for one or more related tables using a simplified syntax. This JSON view of the
underlying relational data model can be read-only if desired, but you can also define it
to support inserting, updating, and deleting data through the same view.
- Storing and Accessing JSON Type Data
Oracle 26ai JSON type to store, query, and transform JSON, with easy access from JSON_OBJECT_T when needed. - Defining JSON Relational Duality View
Define a JSON relational duality view that maps related table data into a single JSON document. - Querying JSON Relational Duality View
Query a JSON relational duality view to retrieve related data as JSON documents. - Modifying JSON Using a Duality View
Modify related table data by inserting, updating, or deleting JSON documents through a duality view. - Flexing the Duality of Duality Views
Work with the same data as JSON documents or relational rows, with changes reflected in both. - Preventing Lost Updates with ETAG
A duality view document's ETAG value prevents a stale update from overwriting newer changes. - Comparing _id and RESID in Duality View
Use RESID as an alternative document identifier for duality view updates and deletes.
Parent topic: Simplifying REST APIs in Oracle 26ai