Showing posts with label Surrogate Key. Show all posts
Showing posts with label Surrogate Key. Show all posts

The Importance of the Surrogate Key in a well design data model

A couple of years ago, when I started working in the data warehouse world, the company I was working  for hired a consultant firm to help us to start building our data warehouse. And, as part of the contract, the consultants would also deliver a set of dashboards and reports. When the first set of reports came to us, we decided to take a look on the code (after all the product being used by the company was completely new for us, and we thought it was a good way to learn more from the experts). After having checked the scripts that generate and maintained the employee dimension, we noticed that the dimension key was built concatenating the date when the record was created and the employee id, which indeed is not a good practice (shame on you experts).