Surrogate Keys


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.



Dimensional Data Warehousing with MySQL. A Tutorial
Dimensional Data Warehousing with MySQL: A Tutorial
ISBN: 0975212826
EAN: 2147483647
Year: 2004
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net