Surrogate Key

Why do we use Surrogate Key?

Questions by mitul arora

Showing Answers 1 - 15 of 15 Answers

Surrogate key:

It is the system generated key which cannot be edited by the user.
It is the primary key of the dimension table in warehouse.
It is nothing but the sequence which generates the numbers for primary key column.

  Was this answer useful?  Yes

Simba123

  • Jul 1st, 2009
 

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.

  Was this answer useful?  Yes

Padma

  • Aug 22nd, 2011
 

Its mainly used for tracking the changes of the data.We can easily find the last updated data through this key.

  Was this answer useful?  Yes

A surrogate key in a database is a unique identifier for either an entity in the modeled world or an object in the database. The surrogate key is not derived from application data.

A surrogate represents an entity in the outside world. The surrogate is internally generated by the system but is nevertheless visible to the user or application.
Although Hall et al. (1976) say nothing about this, others have argued that a surrogate should have the following characteristics:

* the value is unique system-wide, hence never reused
* the value is system generated
* the value is not manipulable by the user or application
* the value contains no semantic meaning
* the value is not visible to the user or application
* the value is not composed of several values from different domains.

  Was this answer useful?  Yes

Rajesh Swarnkar

  • Feb 28th, 2012
 

Usually Surrogate keys are System Generated keys that can be used in place of missing primary key.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions