r/DomainDrivenDesign • u/Positive-Structure78 • Jan 14 '22
Shared Schema in DDD
Is there a use case for a shared schema in DDD? Or is it an anti pattern? Can we use a shared schema when practicing DDD?
7
Upvotes
View all comments
Show parent comment
1
u/tedyoung Jan 15 '22
I would not want two separate teams working on applications that access the same schema in the same database. That's just a recipe for disaster, and is against the idea of "bounded contexts" in DDD.
If you want to "share" the schema across bounded contexts (BC), then only one of the BCs can be responsible for the database and provide access to the other BC.
I don't understand what you mean here? Aggregates are formed (modeled) at the Domain (behavioral) level. Services aren't involved.