Method, system, and program product for executing a scalar function on a varying number of records within a RDBMS using SQL
AssigneeInternational Business Machines Corporation
InventorsMark Ramsey, Milind Chitgupakar, Calisto Zuzarte
Life of this patent
Estimating the term…
Abstract
Application of a scalar function across a varying number of records within an RDBMS using the RDBMS's SQL capabilities. This is accomplished by determining a last row in a group of rows, sorting the rows and passing the sorted rows to a scalar function, where the scalar function accepts each row and stores the accepted rows in a temporary file space. When the last row is encountered, the aggregate value is calculated using all of the rows in the group, and then a filter is applied on the rows so that only a row with the aggregate value is returned.
Claims9
A method of applying a scalar function across a varying number of records in a relational database management system, comprising the steps of:
- a) determining a last row in a group of rows;
- b) sorting said rows and passing the sorted rows to a scalar function, said scalar function adapted to accept each row and store the accepted rows in a temporary file space;
- c) when a last row is encountered, calculating an aggregate value using all of the rows in the group;
- and
- d) applying a filter on said rows so that only a row with said aggregate value is returned.
A relational database management system configured and controlled to apply a scalar function across a varying number of records by a method comprising the steps of:
- a) determining a last row in a group of rows;
- b) sorting said rows and passing the sorted rows to a scalar function, said scalar function adapted to accept each row and store the accepted rows in a temporary file space;
- c) when a last row is encountered, calculating an aggregate value using all of the rows in the group;
- and
- d) applying a filter on said rows so that only a row with said aggregate value is returned.
A program product comprising computer readable program code to configure and control a computer including a relational database management system to apply a scalar function across a varying number of records in the relational database management system, comprising the steps of:
- a) determining a last row in a group of rows;
- b) sorting said rows and passing the sorted rows to a scalar function, said scalar function adapted to accept each row and store the accepted rows in a temporary file space;
- c) when a last row is encountered, calculating an aggregate value using all of the rows in the group;
- and
- d) applying a filter on said rows so that only a row with said aggregate value is returned.
Dependencies are inferred from the claim text.