JSON in Oracle Database version 12.2

By Kim Berg Hansen

Elevator Pitch

Oracle database 12.2 works well with JSON, both querying and creating. You can search in the JSON and index it, integrate GeoJSON with Spatial, and generate JSON from your relational data. The database can even autogenerate views and virtual columns from the content of the JSON data if you wish.

Description

Native support of JSON within Oracle Database became available in version 12.1.0.2 and greatly expanded and improved in version 12.2. This session will give you an overview and examples of the various JSON functionalities, such as:

  • Functions for querying and extracting JSON data
  • JSON path expressions including predicates
  • JSON search indexes, specialized Text indexes
  • JSON Dataguide giving you JSON Schema and automatic views and virtual columns
  • Generate JSON with JSON SQL functions
  • PL/SQL object API for manipulation JSON objects
  • Native spatial integration of GeoJSON objects

Notes

JSON functionality in version 12.2 is much more than the simple functions introduced in version 12.1.0.2. This session will cover the complete JSON functionality of 12.2 (including what was already introduced in 12.1.0.2.) Topics covered will include:

  • Query JSON: JSON_VALUE, JSON_QUERY, JSON_TABLE, JSON_EXISTS
  • dot-notation
  • JSON path expressions
  • Predicates in JSON path expressions
  • JSON search index improving search performance using variant of Oracle Text
  • Dataguide detecting metadata of the JSON content
  • Dataguide autocreation of JSON schema
  • Dataguide autocreation of relational views on the JSON content
  • Dataguide autocreation of virtual columns per key in key:value pairs
  • JSON creation: JSON_ARRAY, JSON_OBJECT, JSON_ARRAYAGG, JSON_OBJECTAGG
  • PL/SQL API: JSON_ELEMENT_T, JSON_OBJECT_T, JSON_ARRAY_T
  • GeoJSON to SDO_GEOMETRY