GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Data Warehousing

 Print  |  
Question:  Surrogate Key

Answer: Why do we use Surrogate Key?


July 07, 2009 06:56:40 #2
 Simba123   Member Since: July 2009    Total Comments: 1 

RE: Surrogate Key
 
Surrogate keys are system generated keys. They are integers.

Surrogate keys are extremely useful when having type 2 data ( i.e. storing historical information)
For ex: Consider one has a table in which a person and his location are stored. Now when his location is changed and we want to keep a historical record of the same, it is stored with a surrogate key that will help us to uniquely identify the record.

This is also a reason that OLTP keys are not used in the warehouse and a seperate dimension or surrogate key is maintained.
     

 

Back To Question