Suggest an editImprove this articleRefine the answer for “What is an aggregate in DDD?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)An **Aggregate** is a group of related entities and value objects that form a logical whole and are managed as a single unit through its root (the Aggregate Root). **Key point:** an aggregate protects data integrity, since everything inside it changes only through the root, and simplifies managing complex business logic.Shown above the full answer for quick recall.Answer (EN)ImageAn **Aggregate** is a **group of related entities and value objects** that form a **logical whole** and are managed as a single unit. The key parts of an aggregate: 1. **Aggregate Root**: the main entity through which everything inside is accessed. 2. **Invariants**: business rules that must remain true for the whole group. 3. **Boundaries**: everything inside the aggregate changes only through its root. Example: The `Order` aggregate includes `OrderItems`, but an item can only be changed through `Order.add_item()`. **The point:** an aggregate protects data integrity and simplifies managing complex business logic.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.