International Business Machines Corporation
Adapting a relational query to accommodate hierarchical data
Last updated:
Abstract:
A method, system and computer program product for processing hierarchical data is provided. A method for processing hierarchical data in a relational database includes receiving an input parameter in an initial query for querying an array in a hierarchical data object stored in a table of a relational database, and transforming the initial query into a transformed query configured to place all elements of the array into a different table and to apply a sub-query against the table for the input parameter. Once transformed, predicate evaluation logic of a relational engine of the relational database is applied to the transformed query that is then mapped to the initial query. Finally, responsive to receiving a subsequent instance of the initial query, the mapping is referred to in order to replace the initial query with the transformed query and to subsequently apply the predicate evaluation logic to the transformed query.
Utility
2 May 2019
14 Sep 2021