# US 2026/0064713 A1 · Aggregation framework system architecture and method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064713 A1
- Document ID: US20260064713A1
- Status: Published application
- Kind: A1
- Application number: 19/261,553
- Filed: 2025-07-07
- Published: 2026-03-05
- Earliest claimed: 2012-07-26
- Assignees: MongoDB, Inc.
- Applicants: MongoDB, Inc.
- Inventors: Eliot Horowitz; David Lenox Storch; Charles William Swanson
- Web page: https://patentgrep.com/patent/US20260064713A1

## CPC

- G06F 16/258: {Data format conversion from or to a database}
- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F 16/2471: {Distributed queries}
- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/284: {Relational databases}
- G06F 16/9538: Presentation of query results
- G06F 16/248: Presentation of query results
- G06F 16/951: Indexing; Web crawling techniques
- G06F 16/958: Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and computer implemented method for execution of aggregation expressions on a distributed non-relational database system is provided. According to one aspect, an aggregation operation may be provided that permits more complex operations using separate collections. For instance, it may be desirable to create a report from one collection using information grouped according to information stored in another collection. Such a capability may be provided within other conventional database systems, however, in a non-relational database system such as NoSQL, the system is not capable of performing server-side joins, such a capability may not be performed without denormalizing the attributes into each object that references it, or by performing application-level joins which is not efficient and leads to unnecessarily complex code within the application that interfaces with the NoSQL database system.

## Claims

### Claim at position 1

-16. (canceled)

### Claim 17

A computer-implemented method for execution of aggregation expressions on a distributed database system, the computer-implemented method comprising:
determining, by a computer system, an optimized plan for execution of an aggregation operation formatted for at least partially unstructured data associated with data stored in a distributed database, wherein the aggregation operation includes a plurality of data operations formatted for at least partially unstructured data,
wherein the plurality of data operations specify at least one first collection of documents comprising attribute-value pairs and at least one second collection of documents comprising attribute-value pairs,
each of the at least one first collection of documents and the at least one second collection of documents specified by the plurality of data operations comprising documents having different schemas specified by respective attribute-value pairs;
modifying, by the computer system, the plurality of data operations to optimize execution;
splitting the aggregation operation into a distributed aggregation operation and a merged aggregation operation;
executing data field dependency analysis on the plurality of data operations to identify a plurality of distributed database nodes of the distributed database having the data associated with the plurality of data operations;
instructing each of the plurality of distributed database nodes to perform the distributed aggregation operation;
aggregating, at a merging server, partial results of the distributed aggregation operation from each of the plurality of distributed database nodes;
performing the merged aggregation operation on the partial results of the distributed aggregation operation from each of the plurality of distributed database nodes hosting the data associated with the plurality of data operations; and
generating results of the merged aggregation operation.

### Claim 18 (depends on 17)

The computer-implemented method according to claim 17, wherein the attribute-value pairs of the at least one first collection of documents and of the at least one second collection of documents comprise key-value pairs.

### Claim 19 (depends on 17)

The computer-implemented method of claim 17, wherein the plurality of data operations specify at least a singular grouping of documents comprising a plurality of documents supporting values for at least one different data field with respect to one another.

### Claim 20 (depends on 17)

The computer-implemented method of claim 17, wherein executing the data field dependency analysis includes:
determining whether results of the aggregation operation are independent of at least one data field supported by the at least one first collection of documents and/or the at least one second collection of documents; and
in response to determining the results of the aggregation operation are independent of the at least one data field, identifying the at least one data field to be eliminated from the execution of the plurality of data operations.

### Claim 21 (depends on 20)

The computer-implemented method according to claim 20, wherein identifying the at least one data field to be eliminated from the execution of the plurality of data operations further comprises passing data from at least one prior operation of the plurality of data operations to at least one subsequent operation of the plurality of data operations.

### Claim 22 (depends on 20)

The computer-implemented method of claim 20, wherein the plurality of data operations are configured to accommodate inclusion of at least one data field in a schema specified by attribute-value pairs in at least one first document in a singular grouping of documents of the at least partially unstructured data and omission of the at least one data field by a schema specified by attribute-value pairs in at least one second document of the singular grouping of documents.

### Claim 23 (depends on 17)

The computer-implemented method according to claim 17, wherein splitting the aggregation operation into a distributed aggregation operation and a merged aggregation operation, includes identifying operations for execution on database shards or respective database nodes, and identifying operations that rely on merging data output from other operations.

### Claim 24 (depends on 17)

The computer-implemented method according to claim 17, wherein modifying the plurality of data operations includes analyzing dependencies defined in the optimized plan and modifying a sequence of execution of operations within the optimized plan, wherein modifying the sequence of execution of operations includes modifying execution of a merge operation of the sequence of execution.

### Claim 25 (depends on 17)

The computer-implemented method of claim 17, wherein the distributed aggregation operation is executed across a plurality of nodes in parallel.

### Claim 26 (depends on 17)

The computer-implemented method according to claim 17, wherein the at least one first collection of documents and the at least one second collection of documents each comprise at least BSON and/or JSON data structures having different schemas.

### Claim 27

A distributed database system for execution of aggregation expressions on a distributed database, the distributed database system comprising:
at least one processor operatively connected to a memory;
a plurality of distributed database nodes configured to perform a distributed aggregation operation;
a router component, executed by the at least one processor, configured to instruct each of the plurality of distributed database nodes to perform the distributed aggregation operation; and
an aggregation engine, executed by the at least one processor, configured to:
determine an optimized plan for execution of an aggregation operation formatted for at least partially unstructured data associated with data stored in the distributed database, wherein the distributed aggregation operation includes a plurality of data operations formatted for at least partially unstructured data,
wherein the plurality of data operations specify at least one first collection of documents comprising attribute-value pairs and at least one second collection of documents comprising attribute-value pairs,
each of the at least one first collection of documents and at least one second collection of documents specified by the plurality of data operations comprising documents having different schemas specified by respective attribute-value pairs;
modify the plurality of data operations to optimize execution;
split the aggregation operation into the distributed aggregation operation and a merged aggregation operation based at least in part on data field dependency analysis on the plurality of data operations to identify ones of the plurality of distributed database nodes having the data associated with the plurality of data operations;
aggregate, at a merging shard server, partial results of the distributed aggregation operation from each of the plurality of distributed database nodes associated with the plurality of data operations;
perform the merged aggregation operation on the partial results; and
generate results of the merged aggregation operation.

### Claim 28 (depends on 27)

The distributed database system according to claim 27, wherein the attribute-value pairs of the at least one first collection of documents and of the at least one second collection of documents comprise key-value pairs.

### Claim 29 (depends on 27)

The distributed database system of claim 27, wherein the plurality of data operations specify at least a singular grouping of documents comprising a plurality of documents supporting values for at least one different data field with respect to one another.

### Claim 30 (depends on 27)

The distributed database system of claim 27, wherein the aggregation engine is configured to execute the data field dependency analysis at least in part by:
determining whether results of the aggregation operation are independent of at least one data field supported by the at least one first collection of documents and/or the at least one second collection of documents; and
in response to determining the results of the aggregation operation are independent of the at least one data field, identifying the at least one data field to be eliminated from the execution of the plurality of data operations.

### Claim 31 (depends on 30)

The distributed database system according to claim 30, wherein the aggregation engine is configured to identify the at least one data field to be eliminated from the execution of the plurality of data operations at least in part by passing data from at least one prior operation of the plurality of data operations to at least one subsequent operation of the plurality of data operations.

### Claim 32 (depends on 30)

The distributed database system of claim 30, wherein the plurality of data operations are configured to accommodate inclusion of at least one data field in a schema specified by attribute-value pairs in at least one first document in a singular grouping of documents of the at least partially unstructured data and omission of the at least one data field by a schema specified by attribute-value pairs in at least one second document of the singular grouping of documents.

### Claim 33 (depends on 27)

The distributed database system according to claim 27, wherein the aggregation engine is configured to split the aggregation operation into a distributed aggregation operation and a merged aggregation operation at least in part by identifying operations for execution on database shards or respective database nodes, and identifying operations that rely on merging data output from other operations.

### Claim 34 (depends on 27)

The distributed database system according to claim 27, wherein the aggregation engine is configured to modify the plurality of data operations at least in part by analyzing dependencies defined in the optimized plan and modifying a sequence of execution of operations within the optimized plan, wherein modifying the sequence of execution of operations includes modifying execution of a merge operation of the sequence of execution.

### Claim 35 (depends on 27)

The distributed database system of claim 27, wherein the router component is configured to instruct the plurality of distributed database nodes to perform the distributed aggregation operation in parallel.

### Claim 36 (depends on 27)

The distributed database system according to claim 27, wherein the at least one first collection of documents and the at least one second collection of documents each comprise at least BSON and/or JSON data structures having different schemas.
