DaveWentzel.com            All Things Data

Canonical Data Models

Basically, a canonical data model is (usually) an industry-standard data model for a given subject matter area.  Instead of then having to write separate interfaces to/from the various formats you can basically just write the from/to translator for your format and the canonical data model.  Good for communicating between enterprise applications.  

helps with reusability in your SOA services.  

works well as an abstraction layer

tried-and-true design pattern

helps to enforce contracts

reduces the need for regression testing

still, changes to the canonical model will affect each and every consumer.  This is a problem solved by using the facade pattern, where each consumer has a kind of "customized" view into the canonical model which would expose a tighter data contract between the consumer and the facade.  

Shouldn't every data model therefore by a canonical data model?

It would kinda seem like that would be the goal.  "canonical" means that this particular data model is "special".  It is the blessed data model for the subject area within the organization.  Other subgroups of the organization, or other applications built within the organization may have different, or more or less verbose data models, but this is *the* data model for the subject that the organization is striving to achieve for interoperability.  

So, like everything else, my canonical data models are never *right* from the start, they are a work in progress that evolve over time as we learn new things about the business and as time and resources grant us more flexibility.  The goal really should be that the canonical model, at some point in the future, becomes *the only* data model of the enterprise.  

DeveloperArchitect Topics

Add new comment