Hierarchical Window Database Query Execution
AssigneeSap SE
InventorsRobert Brunel, Norman May
Life of this patent
Estimating the term…
Abstract
Addressed herein is the problem of expressing and evaluating computations on hierarchies represented as database tables. Engine support for such computations is very limited today, and so they are usually outsourced into stored procedures or client code. Structural grouping is applied to relational algebra to provide concise syntax to express a class of useful computations. Algorithms are also provided to evaluate such structural groupings efficiently by exploiting available indexing schemes. Related apparatus, systems, techniques and articles are also described.
Claims20
A method for implementation by one or more data processors forming part of at least one computing device, the method comprising:
- receiving, by a database, a query requesting data in the form of a table in which each row is related to a different node of a hierarchy of nodes, the query specifying a hierarchical window clause and at least one expression containing a window function on a hierarchical window specified by the hierarchical window clause;
- constructing a directed acyclic graph of at least a portion of the rows in a windowed table based on the hierarchical window clause;
- obtaining, based on expressions specified by the query, results responsive to the query by accumulating data from the rows across edges of the directed acyclic graph;
- and
- providing data comprising at least a portion of the obtained results.
A system comprising:
- at least one data processor;
- and
- memory storing instructions which, when executed by the at least one data processor, result in operations comprising:
- receiving, by a database, a query requesting data in the form of a table in which each row is related to a different node of a hierarchy of nodes, the query specifying a hierarchical window clause and at least one expression containing a window function on a hierarchical window specified by the hierarchical window clause;
- constructing a directed acyclic graph of at least a portion of the rows in a windowed table based on the hierarchical window clause;
- obtaining, based on expressions specified by the query, results responsive to the query by accumulating data from the rows across edges of the directed acyclic graph;
- and
- providing data comprising at least a portion of the obtained results.
A non-transitory computer program product storing instructions which, when executed by at least one data processor forming part of at least one computing system, result in operations comprising:
- receiving, by a database, a query requesting data in the form of a table in which each row is related to a different node of a hierarchy of nodes, the query specifying a hierarchical window clause and at least one expression containing a window function on a hierarchical window specified by the hierarchical window clause;
- constructing a directed acyclic graph of at least a portion of the rows in a windowed table based on the hierarchical window clause;
- obtaining, based on expressions specified by the query, results responsive to the query by accumulating data from the rows across edges of the directed acyclic graph;
- and
- providing data comprising at least a portion of the obtained results.
Dependencies are inferred from the claim text.