Let's say I have the following entities.Product, Option, and OptionValueProduct can be created without any options.Option must include at least one OptionValueOptionValue can be created without associations.In this case, can product be an aggregate root? I was thinking 'Yes', but then..I can't delete Option objects associated with a Product object when I delete the Product object because other Product objects might be associated with Option objects.If Product is not an aggregate root, what should I call them? Just an aggregate?
Confusion on aggregate root
domain driven design;aggregate
When you have the question What is the Aggregate Root here?One useful exercise that I've heard:Put all your use cases (behaviors) on sticky notes.Go through the sticky notes and start piling them together where the use cases are related.Examine each pile and try to come up with a concept for it.Go through the use cases in the pile and see if each one matches the concept.Revise as necessary (move notes between piles, update concepts)We often expect ARs to be the nouns of the sentences we make describing business processes. But sometimes there is an over-arching theme of the use cases (a higher level abstraction) that ends up being the AR, and the aforementioned nouns are sub-objects (entities or value objects or documents) within the AR or even just reference data.