Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Unwinding JavaScript Object Notation (JSON) Arrays In Relational Databases

IP.com Disclosure Number: IPCOM000240954D
Publication Date: 2015-Mar-13
Document File: 2 page(s) / 29K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method and system is disclosed for unwinding JavaScript object notation (JSON) arrays in relational databases.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 01 of 2

Arrays In Relational Databases

Arrays In Relational Databases

Binary encoding of JavaScript object notation (JSON)(BSON) documents hold array elements. Relational databases need efficient ways to perform unwind operations on these array elements. There is an increase in demand to perform joins between relational data and BSON array elements in relational database systems. Informix servers need to unwind array elements on multiple BSON types for mathematical aggregation and pipeline operation. Users are required to build reports based on a combination of relational data and Not Only SQL (No SQL) data which includes aggregation on top of multiple joins. Users also unwind BSON array elements in order to perform joins, aggregation, and pipeline operations.

Disclosed is a method and system for unwinding JSON arrays in relational databases. The method and system utilizes an array iterator model for unwinding multiple arrays from single or multiple tables. Multiple arrays are un-winded by either a nested array iterator model or a horizontal array iterator model. Multiple levels of derived table statements are thus eliminated during pipeline and joining multiple tables after array unwinding.

In accordance with the method and system, an Informix server performs array unwind operations during table level scan and another after applying all projection expressions to the final result set. Unwinding operations during table level scan yield five types of solutions such as, table level array unwind, projection level array unwind, horizontal unwind, vertical (nested) unwind and predicate handling.

At table level array, an unwind iterator reads rows from the scan iterator and provides input to the above iterators such as, for example, select * from tab1 unwind bson_unwind(tab1.

, "$computer").

At projection level array, the unwind iterator unwinds arrays from the BSON document generated after join, "group by", order or union operations. Projection unwind iterator is not attached to a specific table. Using this, Informix server unwinds dynamic BSON array which are provided in the projection column list such as, for example, select bson_unwind(

, "$computer") , col2 , col3 from tab1.

At horizontal unwind, Informix server builds a horizontal unwind iterator for multiple arrays from a single or multiple tables. Array unwind operations are performed before

joining tables tab1 and tab2 such as, for example, select * from ta...