Search code examples
master-data-services

Can Domain-based attributes span across models


If models in Master Data Services are representations of subject areas (such as customer, product, etc.), is it possible to have a domain-based attribute that uses a different model as it's source?

For example, if creating a customer model and defining an entity called Customers, this entity will have address information for the customer. City, State/Province, Country, etc.

But rather than creating an entity for CustomerCountry, can I use a Geography model that contains a Country entity and link to that? Then I can also use the Geography.Country entity for Vendors and Employees.


Solution

  • No, you cannot cross model boundaries - the primary reason is that a model is the unit of versioning. There are two workarounds:

    1. Duplicate the entities in question - i.e. copy the geography entities into your customer model
    2. Reference an entity by code - i.e. add a CITY_CODE to your customer entity

    Neither of these are great options 1) is unwieldy and 2) doesn't maintain automatic integrity.

    Personally I use option 2) where I can with some additional logic/business rules outside of MDS to ensure that codes match. This is easier with codes that are global and do not change such as country and city codes.