The surrogate key column in a dimension table is the primary key of the dimension table. The values of a surrogate key are usually sequential numbers having no business significance. By contrast, many keys from the source data have business meaning.
You generate surrogate key values from within your data warehouse; you do not get surrogate key values from the source data. I cover the purpose of having surrogate keys in Chapter 2, “Dimension History.”
In MySQL you generate surrogate key values by setting the AUTO INCREMENT attribute of the column. Passing NULL to an AUTO INCREMENT column inserts an incremented integer.
Enough theory. Let’s now start building our data warehouse. The following section, “Tasks” elaborate the steps you need to perform in this chapter.