Lecture #5 - Surrogate keys - Lecture #5 Surrogate keys...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture #5 – Surrogate keys Surrogate means an artificial or synthetic product that is used as a substitute for a natural product. A natural product is generally costlier than the surrogate product and this forces us to use the later to save money. In a data warehousing environment also, we cannot “afford” to use the natural keys, as they are “expensive” in terms of the space they occupy. Moreover, surrogate keys have other advantages as well. In this lecture we are going to have a closer look at these surrogate keys. There are many different terms that are being used for natural keys. Some of them are: Production keys Smart keys Intelligent keys They are called so because they have some information embedded in them about the record they represent. Surrogate keys also have various aliases. Some of them are: Meaningless keys Integer keys Non-natural keys Artificial keys It is strongly recommended to use surrogate keys in dimensional models rather than relying on the operation production keys. As designers of operational systems we have been trained to incorporate as much information into the keys (making keys out of the given data). Surrogate key are integers that are assigned sequentially to as needed to populate a dimension. For example, the first product record is assigned a product surrogate key with the value of 1, the next product record is assigned the value 2 and so on. We use 4 bytes for a surrogate key (is it sufficient??). Surrogate keys are merely used to join the dimension tables to the fact tables. Advantages of Surrogate keys: Buffer the data warehouse from operational changes. Space saving Provide performance advantages Enable efficient handling of changes to dimension tables. We will look at these advantages in detail later. First let us try to understand how surrogate keys are generated before data is loaded into the data warehouse. Keys for the Dimension Tables
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Lecture #5 - Surrogate keys - Lecture #5 Surrogate keys...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online