发明名称 Adapting a relational query to accommodate hierarchical data
摘要 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.
申请公布号 US9626408(B2) 申请公布日期 2017.04.18
申请号 US201414299678 申请日期 2014.06.09
申请人 International Business Machines Corporation 发明人 Demir Suavi A.
分类号 G06F17/30 主分类号 G06F17/30
代理机构 CRGO Law 代理人 Greenberg, Esq. Steven M.;CRGO Law
主权项 1. A relational database data processing system comprising: a host computing system comprising at least one computer with memory and at least one processor; fixed storage disposed in the host computing system; a relational database stored in the fixed storage, the relational database storing a plurality of hierarchical data objects; a relational engine executing in the memory of the host computing system and managing queries upon the hierarchical data objects of the relational database; and, a hierarchical data processing module coupled to the relational engine, the module comprising program code enabled upon execution in the memory of the host computing system to receive an input parameter in an initial query for querying an array in a hierarchical data object stored in a table of the relational database, to transform 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, to explicitly typecast the elements of the array to a specified data type and to respond to detecting a failure of the typecasting, by returning a NULL value to the relational engine and to limit a character size of the elements of the array to a specified width and to respond to detecting an element of the array having a character size that exceeds the specified width, by returning a NULL value to the relational engine, to direct the relational engine to apply predicate evaluation logic of the relational engine to the transformed query, to map the transformed query to the initial query, and to respond to receiving a subsequent instance of the initial query, by referring to the mapping to replace the initial query with the transformed query and by subsequently directing the relational engine to apply the predicate evaluation logic to the transformed query.
地址 Armonk NY US