What is the primary purpose of using surrogate key?

  1. What is the primary purpose of using surrogate key?
  2. Will those be used in fact tables? If not then what is the purpose in using it?

Answer:

Surrogate key is used for indexing purpose  i.e. as a primary key for a table.

Reason of using Surrogate Key over Primary Key:
Primary Key may take more or less memory i.e. it may contain characters but Surrogate Key contains only number.  So comparison of numbers is easy when comparing with characters. 

Yes, Surrogate Key will be used in fact tables to establish a relationship between dimensions.  Surrogate keys are implemented by using the Sequence generator.

Random Questions

  • Roshan

    nice example,thanks

  • Bi Dev

    good one thanks