SQL access to JSON documents

Creating a Db2® version (or higher) database, or upgrading to Db2 V11.1.4.4, provides you with a new set of built-in JSON SQL functions that improve SQL interaction with JSON data.

With these functions, you can store, retrieve, and query JSON and BSON data directly using SQL. You can also create JSON documents using SQL.

These functions follow the grammar and semantics outlined in the ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) SQL Technical Report "Part 6: SQL support for JavaScript Object Notation (JSON)" (TR 19075-6:2017), which outlines a set of SQL language for storing, querying, and publishing JSON data.

As built-in functions, the Db2 JSON SQL functions reside in the SYSIBM schema and do not require users to hold any privilege on a function in order to invoke it.

The new built-in JSON SQL functions replace the original set of JSON SQL functions provided in the SYSTOOLS schema. While the new JSON SQL functions are the recommended approach, the original set of functions are still functional and will still be supported within Db2.