Re: Exposing DB Primary keys outside the Bounded Context

"tnabil76" <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>


Hi,

Coming a bit late to the discussion, I'm not aware of any article on the matter, but from experience I have found that sharing surrogate keys across BCs is a bad idea.

The reason is, such keys are internal details of the BC that you might decide to change at any point in time. If you have shared this key with other BCs then any change will have a lot of impacts. 

On the other hand, natural keys are business concepts that rarely change and when they do, they impact everything anyway.

Tarek Nabil

--- In [email protected], "cjjohansen_ddd" <chr.j.johansen@...> wrote:
>
> Hi 
> 
> After doing some searches i didn't manage to find anything spot on.. 
> So does anyone have links to articles describing, 
> when not to expose DB Primary keys of entities outside the Bounded Context (BC), and when it's acceptable.
> 
> BR Christian
>




------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.