A surrogate key is a system-generated unique ID created for a dimension table.
It is not coming from the source system, unlike customer_code or product_code.
Usually it’s an auto-increment integer like customer_key = 101,102,103.
We use it to maintain stable relationships with the fact table.
In one project, source customer IDs changed after migration but reports stayed correct because of surrogate keys.
It also supports slowly changing dimensions like tracking customer address history.
Improves join performance compared to long text business keys.
Prevents duplicates when multiple sources send same business ID.
So it keeps the model consistent and historically accurate.
What is a surrogate key and why is it used?
Updated on February 13, 2026
< 1 min read
