主权项 |
1. A computer implemented method for generating a report for a resource, the report being generated from databases comprising data sets related to a plurality of resources, the method comprising:
dynamically generating, by a processor, a first query upon selection of at least one attribute by a user from a plurality of attributes, wherein the first query comprises instructions for being performed on the data set, wherein the plurality of attributes correspond to a particular instance of the resource, wherein the plurality of attributes of a plurality of resources is stored in a source data set; determining, by the processor, whether the first query is stored in a table schema, wherein the table schema is associated with a first trigger; invoking, by the processor, the first trigger when the first query is stored in the table schema, wherein the first trigger is configured to execute the first query to generate a materialized view upon execution of the first query, wherein the materialized view is a database object that contains results of the first query; generating, by the processor, a second query on the materialized view, based on user selection of the result of the first query rendered in the materialized view; dynamically generating, by the processor, the report by executing the second query on the materialized view, wherein the second query is generated based on materialized view data, and wherein the report comprises relevant data and corresponding updated data from the source data set, and wherein the source data set is associated with a second trigger to dynamically update the materialized view data when a change is recorded in the source data set; and generating a snapshot table based on the execution of the first query when the first query is not stored in the table schema in order to generate the report, wherein the snapshot table is configured to store the output of the first query. |