Systems, methodologies, media, and other embodiments associated with supporting materialized views with user-defined aggregates are described. One example system includes logic for exposing a set of interface actions to support a user-defined aggregate in a materialized view associated with a base table. The materialized view may store both the user-defined aggregate and a user-defined aggregate context that facilitates logically connecting the user-defined aggregate to the base table. The example system may also include logic for supporting the user-defined aggregate. The support may be based on the set of interface actions. Example systems and methods may, therefore, facilitate incremental updating of the materialized view and/or rewriting a query to access the materialized view.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A system, comprising: an interface logic, embodied on a computer-readable storage medium, to expose a set of interface actions to support a user-defined aggregate in a materialized view associated with a base table, the materialized view and the user-defined aggregate being associated with a user-defined aggregate context; an aggregate logic, embodied on a computer-readable storage medium, to support the user-defined aggregate through the user-defined aggregate context, where the user-defined aggregate context is configured to be invoked by at least one interface action from the set of interface actions based, at least in part, on data in the materialized view to facilitate incremental updating of the materialized view; where the aggregate logic includes an initialization logic to establish a location in the materialized view for the user-defined aggregate, to establish a location in the materialized view for the user-defined aggregate context, to establish a first value for one or more values associated with computing the user-defined aggregate, and to establish a first value for the user-defined aggregate; where the aggregate logic includes an update logic to selectively update the user-defined aggregate based, at least in part, on a data item received from the interface logic, the update being controlled, at least in part, by the user-defined aggregate context; where the user-defined aggregate context is one of, an instance of a user-defined data type that stores information to maintain the user-defined aggregate, an instance of a user-defined data type that stores executable instructions to maintain the user-defined aggregate, and an object that is an instance of a user-defined type; and where the system is to control a query rewrite logic associated with a database in which the base table resides to selectively rewrite a query to access the base table into a query to access the materialized view.
2. The system of claim 1 , where the interface logic includes a link logic to logically link the base table to the materialized view through the set of interface actions and the user-defined aggregate context, the set of interface actions to include an initialization action, an update action, and a value reporting action.
3. The system of claim 2 , where the interface logic includes a detect logic to detect a change to the base table and to determine that the change is relevant to the materialized view based, at least in part, on the user-defined aggregate context.
4. The system of claim 3 , where the interface logic includes a provide logic to selectively provide a data item to the materialized view in response to the detect logic determining that the item is relevant to the materialized view.
5. The system of claim 1 , where the user-defined aggregate context is configured to generate additional data in a column of the materialized view in response to the at least one action from the set of interface actions.
6. The system of claim 1 , where the aggregate logic includes a value logic to selectively provide the value of the user-defined aggregate, the providing being controlled, at least in part, by the user-defined aggregate context.
7. The system of claim 1 , where the system is to control an incremental update logic associated with a database in which the base table resides to selectively incrementally update the materialized view.
8. A system, embodied on a non-transitory computer-readable storage medium, comprising: interface logic to expose a set of interface actions to support a user-defined aggregate in a materialized view associated with a base table, the materialized view and the user-defined aggregate being associated with a user-defined aggregate context; wherein the interface logic includes a link logic, a detect logic, and a provide logic, the link logic to logically link the base table to the materialized view through the set of interface actions and the user-defined aggregate context, the set of interface actions to include an initialization action, an update action, and a value reporting action, the detect logic to detect a change to the base table and to determine that the change is relevant to the materialized view based, at least in part, on the user-defined aggregate context, the provide logic to selectively provide a data item to the materialized view in response to the detect logic determining that the item is relevant to the materialized view, aggregate logic to support the user-defined aggregate through the user-defined aggregate context based, at least in part, on the set of interface actions, where the user-defined aggregate facilitates incremental updating of the materialized view; wherein the aggregate logic includes an initialization logic, an update logic, and a value logic, the initialization logic to establish a location in the materialized view for the user-defined aggregate, to establish a location in the materialized view for the user-defined aggregate context, to establish a first value for one or more values associated with computing the user-defined aggregate, and to establish a first value for the user-defined aggregate, the update logic to selectively update the user-defined aggregate based, at least in part, on a data item received from the interface logic, the update being controlled, at least in part, by the user-defined aggregate context, the value logic to selectively provide the value of the user-defined aggregate, the providing being controlled, at least in part, by the user-defined aggregate context, wherein the system is to control an incremental update logic associated with a database in which the base table resides to selectively incrementally update the materialized view, and wherein the system is to control a query rewrite logic associated with a database in which the base table resides to selectively rewrite a query to access the base table into a query to access the materialized view.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
July 13, 2007
November 30, 2010
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.