Re: Why should the schema be in the bounded context?
"zampano3000" <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Hi Tomas, it's quite simple: Each Model in BC maintains its (data) integrity in that context. Because a database is the persistence of that it should follow the same rule, maintain your schema in that context. Otherwise another model would use the same schema for a completely other context and perhaps would change it. This would lead to inconsistency and death. Only if they cooperate very closely it may work. Regarding Vaughns statement: perhaps it's a bit confusing to say BC is a lingustic matter. But if you think of a BC as a tool in the solution space - for a model that's defined in its linguistic border (the UL) being implemented with a specific schema then it makes sense. Does that make sense? ;-) Cheers, Nino --- In [email protected], "tomas.jansson@..." <tomas.jansson@...> wrote: > > I'm reading Implementing DDD by Vaughn Vernon and have a couple of questions. I take them in separate posts so I don't mix the threads. > > In the book he says you should keep the schema, if you have implemented it yourself, inside the boundary of the bounded context. That goes against the earlier statement that the bounded context should match the lingustic. I really doubt that the domain expert will talk about the database schema. > > I guess what he tries to emphasize is that there are some technical aspects part of the bounded context as well that might not be part of the ubiquitous language. For example, if we have somekind of implementation detail like a factory for creating something it is part of bounded context but maybe not of the language you use when talking to the domain expert. To the domain expert you only mention the "thing" the factory creates. > > Short version, why should the schema be part of the bounded context? > ------------------------------------