An aggregate is either a group of related objects/data or the result of some operation on such group. The tag can be used for example for language specific data structures, algorithms that combine data and GROUP BY queries, UML relationships, or DDD aggregates that combine dependent objects.

An aggregate may refer to:

  • a data structure composed of several other data structures. For example, struct, class, arrays are aggregates. Programming language specifications may restrict the usage of the term (e.g. C++ uses the term aggregate only for such structures that have no private/protected members, no base class and no virtual function, refer to ISO C++ section 8.5.1).

  • data obtained by combining data using grouping, statistical operations, and machine learning. For example you can count, average, sum data with SQL GROUP BY. Such data can be stored in data warehouse models to accelerate multidimensional analysis. By extension the term may also be used to designate aggregate functions

  • a class that has an aggregation relationship other classes (UML). Typically, an aggregation represents a "whole/part" or a "has-a" relationship, in which the parts are independent of the aggregate (e.g. they could be shared between different aggregates).

  • a group of objects that can be treated as a single unit and accessed via a root object (Domain Driven Design)