Patent ID: 8341172

Claim:
A system for generating aggregate data values from data stored in a data source, comprising: a processor; a database service available in a network environment, the database service comprising (a) a data source, (b) an abstract data layer, wherein the abstract data layer comprises a plurality of logical fields used to compose an abstract query to query the data source, and for each logical field, providing an access method specifying at least a method for accessing the data, wherein at least one logical field specifies an aggregate access method, wherein the aggregate access method specifies a set of input data and an expression for determining an aggregate data value from the set of input data; and (c) a runtime component configured to process an abstract query that includes the at least one logical field by (i) retrieving a definition for the aggregate access method, (ii) determining aggregate data values according to the definition, (iii) merging the aggregate data values with query results obtained for logical fields, other than the at least one logical field, included in the abstract query, and (iv) returning the results to the requesting entity.