2021 – JSON_TRANSFORM SET Operation

The simple explanation of the JSON_TRANSFORM SET operation is that it sets values for specified JSON keys. For example “set $.KEY1 to 42′ will set the value of the KEY1 to 42. That’s pretty straightforward. The real power is the additional behaviours that can be defined such as: If $.KEY1 is missing then add it … Read more

2021 – JSON_TRANSFORM Introduction

A previous post in this series dealt with changes to the JSON data structures. Specifically the addition and population of two new key-value pairs. Two other posts here and here showed how object types can be used to make queries simpler as structures change. This is powerful but also quite limited. What we really need … Read more

2021 – JSON Code Changes With Database Unavailable

The last modification for the JSON structure change is the PL/SQL API. First up lets make sure the query API works. BEGIN DBMS_OUTPUT.PUT_LINE(jpatient_pkg.get_pname( p_os => 1, p_mrn => ‘1’)); END; Patient 1 That is the correct result. Now for the add_patient procedure. BEGIN jpatient_pkg.add_patient( p_name => ‘Bob’, p_os => 1, p_mrn => 11 ); END; … Read more

2021 – What About Indexes

This post compares index creation and usage for RDBMS data and JSON data. I’ll focus on three specific aspects. Creating Indexes Including JSON Search Indexes Verifying Index Usage Oracle’s EXPLAIN PLAN utility shows if an index was used or not in a query Resolving Index Usage Oracle’s EXPLAIN PLAN utility shows the actual actual criteria … Read more

2021 – A Better Uniqueness Function

Iudith Mentzel noticed a problem in my OS_LIST_UNIQUE function. It relied on the Ordering System (OS) number being incremental. For example [3,2,1] would not be considered a unique list. The problem lay in the following steps: Load the passed JSON Array into a table 1 Loop through table 1 sequentially to load unique values into … Read more