Can I just clarify a point: Primaries are still necessary to implement a Dimensional Model? As in, the duality of Surrogates and Primaries is incontrovertible?

The context is I am researching surrogate keys and came by this informative article: https://docs.getdbt.com/blog/kimball-dimensional-model.

The idea of surrogates is awesome - abstract away context by generalising the Primary for each dimension and, by doing so, mitigate changes in production forever. It may come at a slight performance loss initially but at scale the gains off-set and then some.

To enumerate the steps of constructing a dimensional model:

  1. Conform dimensions by de-normalisation to create Star/Snowflake/Galaxy
  2. Generate Surrogate for each Dimension
  3. Join into Fact using the Primary
  4. Generate Fact Surrogate matching dimension's Primary and link back to dimension

So now the business can rename attributes, change what it likes and the Fact would still reflect the correct entities because Fact references dimensions by their Surrogates.

Please do correct any misunderstandings

  • Denormalising the database, seems like a bad idea. also a database changes over time, so you have to change the always the database at least at two points what could be a problem
    – nbk
    Mar 21 at 9:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.