Skip to content
SQLSimplified
Data EngineerQuestion 50 of 55

Natural vs Surrogate Keys

Problem

You are designing the primary keys for the warehouse. Instead of using natural business keys (like customer emails), the architect recommends using auto-incrementing integers or hashes. Write a query that outputs concept with the value: "A surrogate key is a system-generated identifier that has no business meaning, isolating the data warehouse from changes in natural keys in source databases."

Database Schema

This problem acts as a scratchpad. You will write your own DDL/DML or conceptual queries, so there is no predefined schema.

Try It

Loading playground environment...

Hint

Solution