Patent ID: 7792856

Claim:
A method for executing aggregation queries in a pre-existing database, said method comprising the steps of: collecting database information from the pre-existing database, said database information including inconsistent dimensional tables and first fact tables; running an entity discovery process on said inconsistent dimensional tables and said first fact tables to produce entity mapping tables; using said entity mapping tables to generate at least one resolution function; allocating each of a plurality of tuples in said inconsistent dimensional tables to either a guaranteed group or to a non-guaranteed group, said guaranteed group including a plurality of guaranteed groupings, each one of the plurality of guaranteed groupings having a first instance identifier in an image of said at least one resolution function; resolving said inconsistent dimensional tables into resolved dimensional tables by removing one of the plurality of tuples from said inconsistent dimensional tables, said one of the plurality of tuples having no instance identifier in an image of said at least one resolution function and by replacing identity identifiers in said inconsistent dimensional tables with entity identifiers using said at least one resolution function to associate an entity to one instance; resolving said first fact tables into resolved first fact tables using said at least one resolution function; generating an auxiliary table that comprises entities of said entity mapping table that become consistent at hierarchical levels; producing a resolved database, wherein the resolved database comprises at least one resolved first fact table, at least one of the resolved dimensional tables, and a plurality of consistent dimensional tables; running the query efficiently on the pre-existing database including said resolved dimensional tables, resolved first fact tables and the auxiliary table to obtain a query result by obtaining a resolution-aware answer as the union of two subqueries, a first subquery, of said two subqueries, addressing said guaranteed group and a second subquery, of said two subqueries, addressing said non-guaranteed group, by computing an aggregate function for data in said resolved dimensional tables and said resolved first fact tables, said aggregate function having a strict range with an upper bound and a lower bound where a lower bound of a lower hierarchical level is used to compute a lower bound for a higher hierarchical level, and a second table is created containing entities that are inconsistent at a level selected just prior to a current selected level.