Patent ID: 11960479
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 16:
17. A non-transitory computer-readable storage medium storing computer instructions for functionally rewriting iterative queries for a relational database management system (RDBMS), that configure at least one processor, upon execution of the instructions, to perform the following steps:
receiving a first iterative query, the first iterative query having a first non-iterative part that defines a first main table and a first iterative part that generates values in rows of a first working table based on values in rows of the first main table;
determining that the first iterative part modifies all of the rows of the first working table; and
rewriting the first iterative part including:
adding a renaming operation to rename the first working table to produce a new first main table and to rename the first main table to produce a new first working table;
adding a first delete operation to delete each row of the new first working table; and
adding a first loop operation to repeat the first iterative part until a first termination condition is met.