This post originated from an RSS feed registered with Agile Buzz
by Keith Ray.
Original Post: DDD and Multiple Databases
Feed Title: MemoRanda
Feed URL: http://homepage.mac.com/1/homepage404ErrorPage.html
Feed Description: Keith Ray's notes to be remembered on agile software development, project management, oo programming, and other topics.
In Eric Evans's Domain Driven Design, he describes various strategies to use when there are MultipleModels. Two or more teams may each have a BoundedContext for their unique models, and a SharedKernel for the model they have in common. In other situations, where one or more teams are forced to use an application or a database whose model is undesirable, the teams can use an AnticorruptionLayer to convert to/from two models. (In the ConformistStrategy, the team adapts to an existing model, even if it isn't the most desirable, and in the SeparateWays strategy, the teams don't have a shared model or even a shared kernel.)
I bring this up to link it with Martin Fowler's DatabaseStyles: he uses the term IntegrationDatabase for a database intended to be shared by multiple applications, and ApplicationDatabase to describe a db intended to be used by only one application.
It seems that the strategies for SharedKernel, AnticorruptionLayer and ConformistStrategy will tend to encourage the creation or use of an IntegrationDatabase, and the strategies for BoundedContext and SeparateWays will tend to encourage the creation of ApplicationDatabases. And that's OK, as long as everyone involved understands why these choices were made.