System and method of formulating queries in relational databases
First Claim
1. A method of creating a report and preventing multiple-counting in a computer-based business intelligence system, using a client application receiving user inputs and a metadata model containing model objects that represent data sources, the method comprising the steps of:
- a) defining a model based on an existing database comprising a plurality of query subjects, each of the plurality of query subject having at least one fact query item and one primary key;
b) generating a hierarchy of sets and subsets of key query items in the plurality of query subjects within the model according to dimensional information;
c) accepting an input request from a user to define contents of the report;
d) determining an expression to extract data from the database to fulfill the input request;
e) decomposing the expression into subqueries using the hierarchy of sets and subsets of key query items to prevent multiple-counting of data;
f) accessing the data using the subqueries; and
g) producing the report;
wherein the step of generating the hierarchy of sets and subsets of key query items further comprises the steps of;
i. computing a unique set of determinants for a first query subject where a determinant is related to a first set of key query items;
ii. detecting a potential for multiple counting by relating a first subset of the first set of key query items of the first query subject to a second query subject;
iii. relating a second and further subsets of the first subset of the first set of key query items of the first query subject to another query subject where the potential for multiple counting is detected; and
iv. orgranizing the sets and subsets of key query items into a hierarchy so that the highest level of the hierarchy has fewest key query items and each lower level has more key query items, and each higher level has a set of key query items that is a subset of its immediate lower level, to resolve potential multiple-counting of query items.
4 Assignments
0 Petitions
Accused Products
Abstract
The invention introduces a method and system to automatically derive the relationships between query subjects and query items within query subjects so that problems such as those that result in double courting of information are avoided. It provides for creating a report by first defining a model based on an existing database comprising two or more query subjects, each query subject comprising at least one fact query item and one primary key, then generating a hierarchy of sets and subsets of key query items within the model. Next a further fact is introduced into one of the query subjects. The expression is decomposed into sub-queries to prevent double counting of data in ambiguously defined situations. This is achieved using the introduced fact to determine that such decomposition is required. Finally, the data is accessed using the sub-queries, and a report is produced.
-
Citations
3 Claims
-
1. A method of creating a report and preventing multiple-counting in a computer-based business intelligence system, using a client application receiving user inputs and a metadata model containing model objects that represent data sources, the method comprising the steps of:
-
a) defining a model based on an existing database comprising a plurality of query subjects, each of the plurality of query subject having at least one fact query item and one primary key; b) generating a hierarchy of sets and subsets of key query items in the plurality of query subjects within the model according to dimensional information; c) accepting an input request from a user to define contents of the report; d) determining an expression to extract data from the database to fulfill the input request; e) decomposing the expression into subqueries using the hierarchy of sets and subsets of key query items to prevent multiple-counting of data; f) accessing the data using the subqueries; and g) producing the report; wherein the step of generating the hierarchy of sets and subsets of key query items further comprises the steps of; i. computing a unique set of determinants for a first query subject where a determinant is related to a first set of key query items; ii. detecting a potential for multiple counting by relating a first subset of the first set of key query items of the first query subject to a second query subject; iii. relating a second and further subsets of the first subset of the first set of key query items of the first query subject to another query subject where the potential for multiple counting is detected; and iv. orgranizing the sets and subsets of key query items into a hierarchy so that the highest level of the hierarchy has fewest key query items and each lower level has more key query items, and each higher level has a set of key query items that is a subset of its immediate lower level, to resolve potential multiple-counting of query items.
-
-
2. A system for creating a report and preventing multiple-counting in a computer-based business intelligence system, using a client application receiving user inputs and a metadata model containing model objects that represent the data sources, comprising:
-
a) means for defining a model based on an existing database comprising a plurality of query subjects, each of the plurality of query subject having at least one fact query item and one primary key query item; b) means for generating a hierarchy of sets and subsets of key query items in the plurality of query subjects within the model according to the dimensional information; c) means for accepting an input request from a user to define contents of the report; d) means For determining an expression to extract data from the database to fulfill the input request; e) means for decomposing the expression into subqueries using the hierarchy of sets and subsets of key query items to prevent multiple counting of data; f) means for accessing the data using the subquerics; and g) means for producing the report; wherein the means for generating the hierarchy of sets and subsets of key query items includes; i. means for computing a unique set of determinants for a first query subject where a determinant is related to a first set of key query items; ii. means for detecting a potential for multiple counting by relating a first subset of the first set of key query items of the first query subject to the second query subject; iii. means for relating a second and further subsets of the first subset of the first set of key query items of the first query subject to another query subject; and iv. means for organizing the sets and subsets of key query items into a hierarchy wherein the highest level of the hierarchy has fewest key query items and each lower level has more key query items, and each higher level has a set of key query items that is a subset of its immediate lower level, to resolve potential multiple counting of query items.
-
-
3. A storage medium readable by a computer encoding a computer program for execution by the computer to carry out a method for creating a report and preventing multiple-counting, for use in a computer-based business intelligence system, the computer program comprising:
-
a) code means for defining a model based on an existing database comprising a plurality of query subjects, each of the plurality of query subject having at least once fact query item and one primary key query item; b) code means for generating a hierarchy of sets and subsets of key query items in the plurality of query subjects within the model the according to dimensional information; c) code means for accepting an input request from a user to define contents of the report; d) code means for determining an expression to extract data from the database to fulfill the input request; e) code means for decomposing the expression into subqueries using the hierarchy of sets and subsets of key query items to prevent multiple counting of data; f) code means for accessing the data using the subqueries; and g) code means for producing the report; wherein the code means for generating further includes; i. code means for computing a unique set of determinants far a first query subject where a determinant is related to a first set of query items; ii. code means for detecting a potential for multiple counting by relating a first subset of the first set of key query items of the first query subject to a second query subject; iii. code means for relating a second and further subsets of the first subset of the first set of key query items of the first query subject to another query subject; and iv. code means for organizing the sets and subsets of key query items into a hierarchy wherein the highest level of the hierarchy has fewest key query items and each lower level has more key query items, and each higher level has a set of key query items that is a subset of its immediate lower level, to resolve potential multiple counting of query items.
-
Specification